Sha256: 0fb046b8e4a291d0bab6aab324ff4b88107158b5a640195d5fc7c08eaf16d1ad

Contents?: true

Size: 501 Bytes

Versions: 4

Compression:

Stored size: 501 Bytes

Contents

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

    initializer 'RailsAdminSettings Install after_action' do |app|
      require File.dirname(__FILE__) + '/../../app/models/rails_admin_settings/setting.rb'

      if defined?(ActionController) and defined?(ActionController::Base)
        ActionController::Base.class_eval do
          after_action { Settings.unload! }
        end
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ack_rails_admin_settings-1.2.2.1 lib/rails_admin_settings/engine.rb
ack_rails_admin_settings-1.2.2 lib/rails_admin_settings/engine.rb
ack_rails_admin_settings-1.2.1.3 lib/rails_admin_settings/engine.rb
ack_rails_admin_settings-1.2.1.2 lib/rails_admin_settings/engine.rb