Displaying 1 result from an estimated 1 matches for "someactiverecordmodel".
2008 Sep 25
1
defining polymorphic type condition
...ot figure out why
polymorphic associations do not support reconfiguring the type column
used.
For example, I have no way to do a polymorphic association using a
lookup hash which maps an integer to a class name.
Storing a TINYINT unsigned is waaaaay more efficient than storing a
string like "SomeActiveRecordModel" over and over again.
Looking in the association proxy classes for has_one and has_many, I
see:
def construct_sql
case
when @reflection.options[:as]
@finder_sql =
"#{@reflection.quoted_table_name}.#{@reflection.options[:as]}_id
= #{@owner.quot...