Sha256: 05ebde6e7ffdf75c36445d31aca80d2cc04341b144f1063c85296c675d60d49f

Contents?: true

Size: 746 Bytes

Versions: 1

Compression:

Stored size: 746 Bytes

Contents

unless defined?(ENABLE_RAILS_FOOTNOTES)
  ENABLE_RAILS_FOOTNOTES=(RAILS_ENV == 'development')
end
if ENABLE_RAILS_FOOTNOTES
  dir = File.dirname(__FILE__)
  require File.join(dir, 'rails-footnotes', 'footnotes')
  require File.join(dir, 'rails-footnotes', 'backtracer')

  # Load all notes
  #
  Dir[File.join(dir, 'rails-footnotes', 'notes', '*.rb')].sort.each do |note|
    require note
  end

  # 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.
  #
  class ActionController::Base
    prepend_before_filter Footnotes::Filter
    after_filter Footnotes::Filter
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails-footnotes-3.6.7 lib/rails-footnotes.rb