1 | ActiveRecord::Base.set_inheritance_column :sti_type |
Wednesday, November 25, 2009
Customizing ur STI column name
To me, at least, :type is a very generic & commonly in use attribute name when doing modelling, and i don't see a good reason for activerecord to use it for STI (single table inheritance) support. To use my preferred naming strategy, i did the following inside RAILS_ROOT/config/initializers/active_record.rb
Labels:
rails
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment