Created
February 25, 2016 18:39
-
-
Save xander-miller/86bee7e4c7a2896357c5 to your computer and use it in GitHub Desktop.
Code to get a Hash of attribute names and associated database types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Post.attribute_names.map {|n| [n.to_sym,Post.type_for_attribute(n).type]}.to_h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment