Brutyn Nick wrote:
I have a hosting where I can have only 1 database (shame on them!)
On that hosting I want to run 2 application, but those application has
the same models like
user.rb (table: users)
role.rb (table: roles)
I have 2 Applcation A and B, and i want to run them at the same time. So i will do this sort of solution (not very handy)
For each application I when put an extra letter in the tables names
Appliction A: a_users and a_roles
Appliction B: b_users and b_roles
This mean that I need to rename all me class
Nah. First of all you can use ActiveRecord::Base.set_table_name to set the name of a models table regardless of the name of the model.
But perhaps even easier would be to use ActiveRecord::Base.table_name_prefix to set a global prefix for all your tables. Dunno if this is actually easier in your case.