Sha256: 878b7bf45077000cc49bed168d5734ad278c61965e5faafa022e4509c1b43e72
Contents?: true
Size: 905 Bytes
Versions: 3
Compression:
Stored size: 905 Bytes
Contents
module Footnotes class Railtie < ::Rails::Railtie config.before_configuration do if ::Rails.env.development? require 'rails-footnotes/footnotes' require 'rails-footnotes/backtracer' require 'rails-footnotes/view_subscriber' # Require each individual note notes_glob = File.expand_path("../rails-footnotes/notes/*.rb", __FILE__) Dir[notes_glob].each{|note| require note } # Subscribe to view events so we can use them later ActiveSupport::LogSubscriber.attach_to(:action_view, Footnotes.view_subscriber) # The footnotes are applied by default to all actions. To remove the # footnotes from an action, use skip_filter in your controller. ActionController::Base.prepend_before_filter Footnotes::BeforeFilter ActionController::Base.after_filter Footnotes::AfterFilter end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rails3-footnotes-4.0.0.pre.6 | lib/rails-footnotes.rb |
rails3-footnotes-4.0.0.pre.5 | lib/rails-footnotes.rb |
rails3-footnotes-4.0.0.pre.4 | lib/rails-footnotes.rb |