Sha256: 86ccf79ddf64c6c7b11b862444f41f6ef891e22d5191db80d4497e57299194b6

Contents?: true

Size: 1.61 KB

Versions: 5

Compression:

Stored size: 1.61 KB

Contents

module Hancock
    class Engine < ::Rails::Engine
      # isolate_namespace Hancock

    # rake_tasks do
    #   require File.expand_path('../tasks', __FILE__)
    # end

    initializer "hancock_cms.email_defaults" do
      # Write default email settings to DB so they can be changed.

      #temp
      begin
        if Settings and Settings.table_exists?
      #     Settings.default_email_from(default: 'noreply@site.domain')
      #     Settings.form_email(default: 'admin@site.domain')
      #     Settings.email_topic(default: 'с сайта')
          Settings.logo_image(kind: :image)
        end
      rescue
      end
    end
    # initializer 'hancock_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
    #   # Hancock.config.search_models.map(&:constantize)
    #
    #   # Write default email settings to DB so they can be changed.
    #   begin
    #     if Settings and Settings.table_exists?
    #       # Settings.default_email_from(default: 'noreply@site.domain')
    #       # Settings.form_email(default: 'admin@site.domain')
    #       # Settings.email_topic(default: 'с сайта')
    #       Settings.logo_image(kind: :image)
    #     end
    #   rescue
    #   end
    # end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
hancock_cms-2.0.0.2 lib/hancock/engine.rb
hancock_cms-1.0.0.4 lib/hancock/engine.rb
hancock_cms-1.0.0.3 lib/hancock/engine.rb
hancock_cms-2.0.0.1 lib/hancock/engine.rb
hancock_cms-1.0.0.2 lib/hancock/engine.rb