Module: Footnotes

Defined in:
lib/rails-footnotes.rb,
lib/rails-footnotes/version.rb,
lib/rails-footnotes/footnotes.rb,
lib/rails-footnotes/backtracer.rb,
lib/rails-footnotes/notes/env_note.rb,
lib/rails-footnotes/notes/log_note.rb,
lib/rails-footnotes/notes/rpm_note.rb,
lib/rails-footnotes/notes/view_note.rb,
lib/rails-footnotes/notes/files_note.rb,
lib/rails-footnotes/notes/layout_note.rb,
lib/rails-footnotes/notes/params_note.rb,
lib/rails-footnotes/notes/routes_note.rb,
lib/rails-footnotes/notes/assigns_note.rb,
lib/rails-footnotes/notes/cookies_note.rb,
lib/rails-footnotes/notes/filters_note.rb,
lib/rails-footnotes/notes/general_note.rb,
lib/rails-footnotes/notes/queries_note.rb,
lib/rails-footnotes/notes/session_note.rb,
lib/rails-footnotes/notes/abstract_note.rb,
lib/rails-footnotes/notes/partials_note.rb,
lib/rails-footnotes/notes/controller_note.rb,
lib/rails-footnotes/notes/javascripts_note.rb,
lib/rails-footnotes/notes/stylesheets_note.rb

Defined Under Namespace

Modules: Extensions, Notes, RailsFootnotesExtension Classes: AfterFilter, BeforeFilter, Filter

Constant Summary collapse

VERSION =
"3.7.1"
@@before_hooks =
[]
@@after_hooks =
[]

Class Method Summary collapse

Class Method Details

.after(&block) ⇒ Object



12
13
14
# File 'lib/rails-footnotes.rb', line 12

def self.after(&block)
  @@after_hooks << block
end

.before(&block) ⇒ Object



8
9
10
# File 'lib/rails-footnotes.rb', line 8

def self.before(&block)
  @@before_hooks << block
end

.run!Object



27
28
29
30
31
32
33
34
# File 'lib/rails-footnotes.rb', line 27

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

.setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Footnotes)

    the object that the method was called on



36
37
38
# File 'lib/rails-footnotes.rb', line 36

def self.setup
  yield self
end