Sha256: a4e3e409c952ab97809f6e0bca8a3beaf5f6e7b700902fe518213d977bce5fc1

Contents?: true

Size: 954 Bytes

Versions: 8

Compression:

Stored size: 954 Bytes

Contents

module RocketCMS
  class Engine < ::Rails::Engine
    rake_tasks do
      require File.expand_path('../tasks', __FILE__)
    end

    initializer 'rocket_cms.paperclip' do
      require 'paperclip/style'
      module ::Paperclip
        class Style
          alias_method :processor_options_without_auto_orient, :processor_options
          def processor_options
            processor_options_without_auto_orient.merge(auto_orient: false)
          end
        end
      end
    end

    config.after_initialize do
      # trigger autoload so models are registered in Mongoid::Elasticearch
      RocketCMS.configuration.search_models.map(&:constantize)

      # Write default email settings to DB so they can be changed.
      if Settings.table_exists?
        Settings.default_email_from(default: 'noreply@rscx.ru')
        Settings.form_email(default: 'glebtv@ya.ru')
        Settings.email_topic(default: 'с сайта')
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rocket_cms-0.7.1 lib/rocket_cms/engine.rb
rocket_cms-0.7.0 lib/rocket_cms/engine.rb
rocket_cms-0.6.18 lib/rocket_cms/engine.rb
rocket_cms-0.6.17 lib/rocket_cms/engine.rb
rocket_cms-0.6.16 lib/rocket_cms/engine.rb
rocket_cms-0.6.15 lib/rocket_cms/engine.rb
rocket_cms-0.6.14 lib/rocket_cms/engine.rb
rocket_cms-0.6.13 lib/rocket_cms/engine.rb