Displaying 2 results from an estimated 2 matches for "ruby_typ".
Did you mean:
ruby_type
2006 Jun 01
4
What i do if i have a table with a column named "type"?
Hi everybody!
The class ActiveRecord::Base have a atribute named type and if my
table have a column with the same name i get an error if i use
model.finde, model.save and more...
I dont know what i can do to solve this problem!
Someone know?
Thanks
--
_________
Noel R. Morais
2005 Dec 21
0
Overriding inheritance_column
...e. The database has a "job" table that
contains a "type" column. I''ve successfully overridden the names of
the table and the name of the inheritance column by adding
def self.table_name()
''job''
end
Job.inheritance_column =''ruby_type''
to the job model, but then I''m unable to access the type field using
the same "<td><%= job.type %></td>" construct that works for all the
other fields in the .rhtml file. This always yields a value of "Job".
I have to imagine that there...