Sha256: 1c68cf0d4d3c369229d9a1a525de1f674077a829b5b6318509f633e8482785e5

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 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) do
        '::FrontendController'
      end

      mattr_accessor(:creator_class_name) do
        'User'
      end

      mattr_accessor(:user_factory_name) do
        :user
      end

      mattr_accessor(:posts_index_page_title_proc) do
        ->(view) { view.resource_class.model_name.human(count: :other) }
      end

      mattr_accessor(:pagination_options_proc) do
        ->(view) { { theme: 'twitter-bootstrap-4', pagination_class: 'justify-content-center' } }
      end
      mattr_accessor(:preview_picture_asset_variant_options) do
        { combine_options: { resize: "320x240^", extent: "384x216", gravity: "center" } }
      end

      mattr_accessor(:post_creation_information_proc) do
        -> (post) { "#{l(post.created_at)} | #{post.creator&.human}" }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cmor_blog-0.0.55.pre lib/cmor/blog/configuration.rb