Created
September 30, 2011 21:16
-
-
Save trivektor/1254997 to your computer and use it in GitHub Desktop.
Override ActiveRecord single table inheritance mechanism
This file contains 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
# In case your legacy database has a 'type' column and you need to use Rails with it | |
# Add this to your model | |
def self.inheritance_column | |
nil | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment