Sha256: 31e9babc1cf27d4570972db49f69862f2b01ef620c3882f167efd4ce18025924

Contents?: true

Size: 1.19 KB

Versions: 24

Compression:

Stored size: 1.19 KB

Contents

module EffectivePages
  class Engine < ::Rails::Engine
    engine_name 'effective_pages'

    # Include acts_as_tagged concern and allow any ActiveRecord object to call it
    initializer 'effective_pages.active_record' do |app|
      app.config.to_prepare do
        ActiveSupport.on_load :active_record do
          ActiveRecord::Base.extend(ActsAsTagged::Base)
        end
      end
    end

    # Include Helpers to base application
    initializer 'effective_pages.action_controller' do |app|
      app.config.to_prepare do
        ActiveSupport.on_load :action_controller_base do
          helper EffectivePagesHelper
          helper EffectiveCarouselsHelper
          helper EffectivePageSectionsHelper
          helper EffectivePageBannersHelper
          helper EffectiveMenusHelper
          helper EffectiveAlertsHelper
          helper EffectivePermalinksHelper
          helper EffectiveTagsHelper
        end
      end
    end

    # Set up our default configuration options.
    initializer "effective_pages.defaults", before: :load_config_initializers do |app|
      # Set up our defaults, as per our initializer template
      eval File.read("#{config.root}/config/effective_pages.rb")
    end

  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
effective_pages-3.12.0 lib/effective_pages/engine.rb
effective_pages-3.11.0 lib/effective_pages/engine.rb
effective_pages-3.10.3 lib/effective_pages/engine.rb
effective_pages-3.10.2 lib/effective_pages/engine.rb
effective_pages-3.10.1 lib/effective_pages/engine.rb
effective_pages-3.10.0 lib/effective_pages/engine.rb
effective_pages-3.9.0 lib/effective_pages/engine.rb
effective_pages-3.8.4 lib/effective_pages/engine.rb
effective_pages-3.8.3 lib/effective_pages/engine.rb
effective_pages-3.8.2 lib/effective_pages/engine.rb
effective_pages-3.8.1 lib/effective_pages/engine.rb
effective_pages-3.8.0 lib/effective_pages/engine.rb
effective_pages-3.7.11 lib/effective_pages/engine.rb
effective_pages-3.7.10 lib/effective_pages/engine.rb
effective_pages-3.7.9 lib/effective_pages/engine.rb
effective_pages-3.7.8 lib/effective_pages/engine.rb
effective_pages-3.7.7 lib/effective_pages/engine.rb
effective_pages-3.7.6 lib/effective_pages/engine.rb
effective_pages-3.7.5 lib/effective_pages/engine.rb
effective_pages-3.7.4 lib/effective_pages/engine.rb