Sha256: 03c56e6a77dd742c616f5c337d9abc1a503af455857d3e4834b8231a049935b4

Contents?: true

Size: 1011 Bytes

Versions: 60

Compression:

Stored size: 1011 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.config.search_models.map(&:constantize)

      # Write default email settings to DB so they can be changed.
      if defined?(::Settings) && Settings.respond_to?(:table_exists?) && 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

60 entries across 60 versions & 1 rubygems

Version Path
rocket_cms-0.30.0 lib/rocket_cms/engine.rb
rocket_cms-0.29.0 lib/rocket_cms/engine.rb
rocket_cms-0.28.0 lib/rocket_cms/engine.rb
rocket_cms-0.27.8 lib/rocket_cms/engine.rb
rocket_cms-0.27.7 lib/rocket_cms/engine.rb
rocket_cms-0.27.6 lib/rocket_cms/engine.rb
rocket_cms-0.27.5 lib/rocket_cms/engine.rb
rocket_cms-0.27.4 lib/rocket_cms/engine.rb
rocket_cms-0.27.3 lib/rocket_cms/engine.rb
rocket_cms-0.27.2 lib/rocket_cms/engine.rb
rocket_cms-0.27.1 lib/rocket_cms/engine.rb
rocket_cms-0.27.0 lib/rocket_cms/engine.rb
rocket_cms-0.26.1 lib/rocket_cms/engine.rb
rocket_cms-0.26.0 lib/rocket_cms/engine.rb
rocket_cms-0.25.5 lib/rocket_cms/engine.rb
rocket_cms-0.25.4 lib/rocket_cms/engine.rb
rocket_cms-0.25.3 lib/rocket_cms/engine.rb
rocket_cms-0.25.1 lib/rocket_cms/engine.rb
rocket_cms-0.25.0 lib/rocket_cms/engine.rb
rocket_cms-0.24.0 lib/rocket_cms/engine.rb