In CakePHP, I can specify a prefix in my database configuration, f.e. "so_", so that every model looks for its table under this prefix.
Is something similar possible in Rails, too? That is, can several programs share one database?
In CakePHP, I can specify a prefix in my database configuration, f.e. "so_", so that every model looks for its table under this prefix.
Is something similar possible in Rails, too? That is, can several programs share one database?
You can easily specify your own table name for each model with the set_table_name method:
class Mouse < ActiveRecord::Base
set_table_name "so_mice"
end
But you have to do it for each model, I don´t know of any global configuration option.