search for: reset_table_name

Displaying 4 results from an estimated 4 matches for "reset_table_name".

2007 Oct 31
1
how does table_name static method work ?
There has to be a simple explanation for this. I can do this to get the table name behind a model >> User.table_name => "users" Great. But looking at the table_name code in active_record/base.rb, the table_name method is not static (no self.)! def table_name reset_table_name end So why can I call table_name as a static method ??? --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TL...
2009 Feb 25
1
Problem with 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", &qu...
2006 Jul 05
2
Serialized object behaves weird
Hi! I got a class named EinsatzFilter which I serialized to session. Before saving to session it works afterwards I keep getting the message: "undefined method `to_s'' for #<Person:0x38c6ab8>". "Person" is a from ActiveRecord::Base inherited class. Code: class EinsatzFilter include ApplicationHelper attr_reader :personen, :monat, :projekte, :kunde
2011 Sep 13
4
Changing adapters in ActiveRecord does not change the generated sql
If I establish a new connection with a new adapter (ie. switch from mysql to postgresl) the generated sql is still mysql specific. I tried all sorts of reset methods on AR::Base but to no avail. There must be something being memoized on ActiveRecord base that has to do with the adapter and it doesn''t get cleared when you establish a connection with a new adapter. I know this