Sha256: b9414ba0d729fbe8104af6a5af0f7a6be6569381d9e00f9d676cab62a2cd7a96

Contents?: true

Size: 393 Bytes

Versions: 8

Compression:

Stored size: 393 Bytes

Contents

module Cms::Base
  extend ActiveSupport::Concern
  
  included do 
    # Establishing database connection if custom one is defined
    if ComfortableMexicanSofa.config.database_config && !Rails.env.test?
      establish_connection "#{ComfortableMexicanSofa.config.database_config}_#{Rails.env}"
    end
  end
  
  module ClassMethods
    def table_name_prefix
      'cms_'
    end
  end
  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-1.11.2 app/models/concerns/cms/base.rb
comfortable_mexican_sofa-1.11.1 app/models/concerns/cms/base.rb
comfortable_mexican_sofa-1.11.0 app/models/concerns/cms/base.rb
comfortable_mexican_sofa-1.10.3 app/models/concerns/cms/base.rb
comfortable_mexican_sofa-1.10.2 app/models/concerns/cms/base.rb
comfortable_mexican_sofa-1.10.1 app/models/concerns/cms/base.rb
comfortable_mexican_sofa-1.10.0 app/models/concerns/cms/base.rb
comfortable_mexican_sofa-1.9.3 app/models/concerns/cms/base.rb