In addition to Jonathan's answer, you could also override the model's
tablename, EG,
# my_spree_app/config/initializers/qe.rb
module Qe
mattr_accessor :table_name_prefix
self.table_name_prefix ||= 'qe_'
end
# my_spree_app/models/some_class.rb
class SomeClass < ActiveRecord::Base
self.table_name = "#{Qe.table_name_prefix}#{self.table_name}"
end
On Wednesday, October 9, 2013 7:57:50 AM UTC-6, Ryan wrote:
Hi all,
We're looking to use our own namespace for the tables of Spree. At present
its using spree_users, spree_user_roles etc. I'd ideally like to choose our
own prefix similar to Wordpress. Is that possible without using a decorator
for every Spree model?
Many thanks in advance,
Ryan
Hi all,
We're looking to use our own namespace for the tables of Spree. At present
its using spree_users, spree_user_roles etc. I'd ideally like to choose our
own prefix similar to Wordpress. Is that possible without using a decorator
for every Spree model?
Many thanks in advance,
Ryan