Customizing comfortable_mexican_sofa database table names

104 Views Asked by At

In a Rails 4 project using comfortable_mexican_sofa gem for content management, how do you change the default database table names?

I'd like to remove the 'comfy_' prefix so they are just 'cms_blocks', 'cms_pages', etc...

1

There are 1 best solutions below

3
adamliesko On
class ComfyWhateverElseMore < ActiveRecord::Base
  self.table_name = "whatever_you_wish"
end

For reference consider the api docs