I change table_name_prefix during the launch of the rails application (it may seem strange, but really what I want). When table_name_prefix changes for ActiveRecord I reset the table names ( table_name and quoted_table_name ) by calling reset_table_name and they change .. however I have one more problem.
If the table name changes, after calling a thing such as counting or searching for an ActiveRecord object, it still works with the table that was used previously.
How to reach a child's ActiveRecord before reset, so that when the prefix, suffix, table_name changes it, does it work with the new settings?
Thank you for your help!
activerecord ruby-on-rails-3
fifigyuri
source share