Sha256: a2737f577ae68289d64557cc67ee6c16202e10f0493455d90f5799c0dedd32a3

Contents?: true

Size: 1.03 KB

Versions: 37

Compression:

Stored size: 1.03 KB

Contents

require 'active_support/core_ext/module/delegation'
require 'active_support/core_ext/module/attribute_accessors'
require 'active_support/hash_with_indifferent_access'

module Cmor
  module Blog
    module Configuration
      def configure
        yield self
      end

      mattr_accessor(:base_controller) { '::FrontendController' }
      mattr_accessor(:creator_class_name) { 'User' }
      mattr_accessor(:user_factory_name) { :user }
      mattr_accessor(:posts_index_page_title_proc) { ->(view) { view.resource_class.model_name.human(count: :other) } }
      mattr_accessor(:pagination_options_proc) { ->(view) { { theme: 'twitter-bootstrap-3' } } }
      mattr_accessor(:preview_picture_asset_variant_options) { { resize: '320x240' } }
      mattr_accessor(:creator_label_method_name) { :to_s }
      mattr_accessor(:features) { {} }
      def enable_feature(name, options = {})
        @@features[name] = Cmor::Blog::Feature.new(name, options)
      end

      def features?(name)
        @@features.has_key?(name)
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
cmor_blog-0.0.39.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.38.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.37.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.36.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.35.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.34.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.33.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.32.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.31.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.30.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.29.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.28.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.27.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.26.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.25.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.24.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.22.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.21.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.20.pre lib/cmor/blog/configuration.rb
cmor_blog-0.0.19.pre lib/cmor/blog/configuration.rb