I'm using Rails 4. I have app/models/admin.rb and app/models/admin/retention_email.rb that has something like:
# app/models/admin.rb
module Admin
def self.table_name_prefix
"global_admin_"
end
end
# app/models/admin/retention_email.rb
module Admin
class RetentionEmail < ApplicationRecord
end
end
Now I was expecting Admin::RetentionEmail to use global_admin_retention_emails table however seems I'm still using retention_emails:
2.4.1 (main):0 > Admin::RetentionEmail.table_name
=> "retention_emails"
Any ideas how to fix this?