Sha256: 4a0afbea32a0ee112c274594da7b931150ef7f752e428523f508537c0a224de2

Contents?: true

Size: 1.06 KB

Versions: 17

Compression:

Stored size: 1.06 KB

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.

      #temp
      begin
        if Settings.table_exists?
          Settings.default_email_from(default: 'noreply@gpk-holding.ru')
          Settings.form_email(default: 'admin@gpk-holding.ru')
          Settings.email_topic(default: 'с сайта')
        end
      rescue
      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

17 entries across 17 versions & 1 rubygems

Version Path
ack_rocket_cms-0.7.6.4 lib/rocket_cms/engine.rb
ack_rocket_cms-0.7.6.3 lib/rocket_cms/engine.rb
ack_rocket_cms-0.7.6.2 lib/rocket_cms/engine.rb
ack_rocket_cms-0.7.6.1 lib/rocket_cms/engine.rb
ack_rocket_cms-0.7.6 lib/rocket_cms/engine.rb
ack_rocket_cms-0.7.5.2 lib/rocket_cms/engine.rb
ack_rocket_cms-0.7.5.1 lib/rocket_cms/engine.rb
ack_rocket_cms-0.7.5 lib/rocket_cms/engine.rb
ack_rocket_cms-0.7.4.1 lib/rocket_cms/engine.rb
ack_rocket_cms-0.7.4 lib/rocket_cms/engine.rb
ack_rocket_cms-0.7.3 lib/rocket_cms/engine.rb
ack_rocket_cms-0.7.2.4 lib/rocket_cms/engine.rb
ack_rocket_cms-0.7.2.3.2 lib/rocket_cms/engine.rb
ack_rocket_cms-0.7.2.3.1 lib/rocket_cms/engine.rb
ack_rocket_cms-0.7.2.3 lib/rocket_cms/engine.rb
ack_rocket_cms-0.7.2.2 lib/rocket_cms/engine.rb
ack_rocket_cms-0.7.2.1 lib/rocket_cms/engine.rb