Dear friends,
I ran the following in my console.Assume I already have the
postgresql connection .
>> class D < ActiveRecord::Base
>> end
=> nil
>> D.set_table_name "users"
=> nil>> D.column_names
=> ["id", "name", "fname", "lname",
"password", "addr1", "addr2",
"city", "state", "email", "created",
"gender"]
>> D.reset_table_name
=> "ds">> D.set_table_name "orders"
=> nil>> D.column_names
=> ["id", "name", "fname", "lname",
"password", "addr1", "addr2",
"city", "state", "email", "created",
"gender"]
>> D.table_name
=> "orders"
Though I have different columns in "orders" table ,I get the same
column_names for "orders" table .
Please help me.
Regards,
Sarathy
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---