Module: Footnotes

Defined in:
lib/rails-footnotes.rb,
lib/rails-footnotes/version.rb,
lib/rails-footnotes/footnotes.rb,
lib/rails-footnotes/abstract_note.rb,
lib/rails-footnotes/notes/env_note.rb,
lib/rails-footnotes/notes/log_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/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.4"
@@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
35
36
# File 'lib/rails-footnotes.rb', line 27

def self.run!
  require 'rails-footnotes/footnotes'
  require 'rails-footnotes/backtracer'
  require 'rails-footnotes/abstract_note'
  require 'rails-footnotes/notes/all'

  ActionController::Base.send(:include, RailsFootnotesExtension)

  load Rails.root.join('.footnotes') if Rails.root.join('.footnotes').exist?
end

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

Yields:

  • (_self)

Yield Parameters:

  • _self (Footnotes)

    the object that the method was called on



38
39
40
# File 'lib/rails-footnotes.rb', line 38

def self.setup
  yield self
end