Sha256: 37839f4fbfd97e51125bdd756d821dfe997efc47e48bde478be697e9b9962e1f

Contents?: true

Size: 729 Bytes

Versions: 2

Compression:

Stored size: 729 Bytes

Contents

module Footnotes
  
  # The footnotes are applied by default to all actions. You can change this
  # behavior commenting the after_filter line below and putting it in Your
  # application. Then you can cherrypick in which actions it will appear.
  #
  module RailsFootnotesExtension
    def self.included(base)
      base.prepend_before_filter Footnotes::BeforeFilter
      base.after_filter Footnotes::AfterFilter
    end
  end
  
  def self.run!
    require 'rails-footnotes/footnotes'
    require 'rails-footnotes/backtracer'
     
    Dir[File.join(File.dirname(__FILE__), 'rails-footnotes', 'notes', '*.rb')].each { |note| require note }
    
    ActionController::Base.send(:include, RailsFootnotesExtension)    
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
rails-footnotes-3.7.0 lib/rails-footnotes.rb
rails3-footnotes-4.0.0.pre lib/rails-footnotes.rb