I have a table with a fieldname called ''type'' which does not present itself on the CRUD screens. However if I rename it to ''some_type'' it works just fine. Any ideas? Here is my configuration: Ruby version 1.8.2 (i386-mswin32) RubyGems version 0.8.10 Rails version 1.0.0 Active Record version 1.13.2 Action Pack version 1.11.2 Action Web Service version 1.0.0 Action Mailer version 1.1.5 Active Support version 1.2.5 Application root C:/Documents and Settings/blip/selars Environment development Database adapter mysql -- Posted via http://www.ruby-forum.com/.
My Ruby books says "type" is an instance method of the Object class. It is a depricated synonym for the prefered "class" method. -Peter On 3/14/06, exwhyz <humairm@hotmail.com> wrote:> I have a table with a fieldname called ''type'' which does not present > itself on the CRUD screens. However if I rename it to ''some_type'' it > works just fine. Any ideas? Here is my configuration: > > Ruby version 1.8.2 (i386-mswin32) > RubyGems version 0.8.10 > Rails version 1.0.0 > Active Record version 1.13.2 > Action Pack version 1.11.2 > Action Web Service version 1.0.0 > Action Mailer version 1.1.5 > Active Support version 1.2.5 > Application root C:/Documents and Settings/blip/selars > Environment development > Database adapter mysql > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
exwhyz wrote:> I have a table with a fieldname called ''type'' which does not present > itself on the CRUD screens. However if I rename it to ''some_type'' it > works just fine. Any ideas?type as a field name has a special meaning in ActiveRecord. It is used in single table inheritance to specify the type of the object in that row of the database. According to the docs, you can change this by overwriting Base.inheritance_column, although I haven''t tried myself. Ray