Sha256: 0900fd2f1fc23e4334f51a047eaea58307503d628fda8e3012759a890b838bb8

Contents?: true

Size: 1009 Bytes

Versions: 37

Compression:

Stored size: 1009 Bytes

Contents

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

    initializer "rocket_cms.email_defaults" do
      # 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

    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)
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
rocket_cms-0.6.12 lib/rocket_cms/engine.rb
rocket_cms-0.6.11 lib/rocket_cms/engine.rb
rocket_cms-0.6.10 lib/rocket_cms/engine.rb
rocket_cms-0.6.9 lib/rocket_cms/engine.rb
rocket_cms-0.6.8 lib/rocket_cms/engine.rb
rocket_cms-0.6.7 lib/rocket_cms/engine.rb
rocket_cms-0.6.6 lib/rocket_cms/engine.rb
rocket_cms-0.6.5 lib/rocket_cms/engine.rb
rocket_cms-0.6.4 lib/rocket_cms/engine.rb
rocket_cms-0.6.3 lib/rocket_cms/engine.rb
rocket_cms-0.6.2 lib/rocket_cms/engine.rb
rocket_cms-0.6.1 lib/rocket_cms/engine.rb
rocket_cms-0.6.0 lib/rocket_cms/engine.rb
rocket_cms-0.5.24 lib/rocket_cms/engine.rb
rocket_cms-0.5.23 lib/rocket_cms/engine.rb
rocket_cms-0.5.22 lib/rocket_cms/engine.rb
rocket_cms-0.5.21 lib/rocket_cms/engine.rb
rocket_cms-0.5.20 lib/rocket_cms/engine.rb
rocket_cms-0.5.19 lib/rocket_cms/engine.rb
rocket_cms-0.5.18 lib/rocket_cms/engine.rb