Skip to content

Instantly share code, notes, and snippets.

@trivektor
Created September 30, 2011 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trivektor/1254997 to your computer and use it in GitHub Desktop.
Save trivektor/1254997 to your computer and use it in GitHub Desktop.
Override ActiveRecord single table inheritance mechanism
# 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