Sha256: ab4fc1235d392531b0580d8d60af6ec11c99f745b2164b43000294f159078220
Contents?: true
Size: 842 Bytes
Versions: 15
Compression:
Stored size: 842 Bytes
Contents
require 'peek/controller_helpers' module Peek class Railtie < ::Rails::Engine isolate_namespace Peek engine_name :peek config.peek = ActiveSupport::OrderedOptions.new # Default adapter config.peek.adapter = :memory initializer 'peek.set_configs' do |app| ActiveSupport.on_load(:peek) do app.config.peek.each do |k,v| send "#{k}=", v end end end initializer 'peek.persist_request_data' do ActiveSupport::Notifications.subscribe('process_action.action_controller') do Peek.adapter.save Peek.clear end end initializer 'peek.include_controller_helpers' do ActiveSupport.on_load(:action_controller) do include Peek::ControllerHelpers end config.to_prepare do Peek.views end end end end
Version data entries
15 entries across 15 versions & 2 rubygems