Sha256: 6765a299a085dc830c7b9edf3d02ed69f9bb166053dbc2705409005676b8fc40
Contents?: true
Size: 1023 Bytes
Versions: 2
Compression:
Stored size: 1023 Bytes
Contents
module Staccato class Railtie < Rails::Railtie config.before_configuration do |app| app.config.staccato = ActiveSupport::OrderedOptions.new # set defaults app.config.staccato.timing = true app.config.staccato.pageviews = true app.config.staccato.pageview_prefix = "" app.config.staccato.exceptions = false end initializer "staccato.controller_extension" do track_exceptions = config.staccato.exceptions ActiveSupport.on_load(:action_controller) do include Staccato::SessionTracking include Staccato::ExceptionTracking if track_exceptions end end initializer "staccato.configure_subscribers" do if config.staccato.timing ActiveSupport::Notifications.subscribe('process_action.action_controller', Staccato::Subscribers::Timing) end if config.staccato.pageviews ActiveSupport::Notifications.subscribe('process_action.action_controller', Staccato::Subscribers::Page) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
staccato-rails-0.1.0 | lib/staccato/railtie.rb |
staccato-rails-0.0.1 | lib/staccato/railtie.rb |