[Ilugc] Using the RoR ORM technique, I am not able to create a new row for some tables

  • From: citizenofgnu@xxxxxxxxx (தியாகராஜன்)
  • Date: Thu Jan 31 18:50:09 2008


Using the RoR ORM technique, I am not able to create a new row for some
tables (ie Mytable.new  or Mytable.create methods does not work), while at
the same time i can do the same for some other tables. Please can anyone
educate me what is the reason for this.

Hello pal,

I dont think Mytable is a reserved word in Rails convention. Any way
could you please recheck that Class Mytable is mapped to mytables and
not something like my_tables.

If that is the case Class Mytable need to be mapped to table my_tables
in case of a legacy of data, you can override it by using
model_name.classify.constantize tag. please google it for how to use
it.

Thanks

Thyagarajan shanmugham

Other related posts: