Module: Footnotes

Defined in:
lib/rails-footnotes.rb,
lib/rails-footnotes/filter.rb,
lib/rails-footnotes/version.rb,
lib/rails-footnotes/extension.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/each_with_rescue.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/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,
lib/rails-footnotes/notes/log_note/note_logger.rb

Defined Under Namespace

Modules: EachWithRescue, Extensions, Notes, RailsFootnotesExtension Classes: Filter

Constant Summary collapse

VERSION =
"7.1.0"

Class Method Summary collapse

Class Method Details

.after(&block) ⇒ Object



42
43
44
# File 'lib/rails-footnotes.rb', line 42

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

.before(&block) ⇒ Object



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

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

.enabled?(controller) ⇒ Boolean

Returns:

  • (Boolean)


46
47
48
49
50
51
52
53
54
55
56
# File 'lib/rails-footnotes.rb', line 46

def self.enabled?(controller)
  if enabled.is_a? Proc
    if enabled.arity == 1
      enabled.call(controller)
    else
      enabled.call
    end
  else
    !!enabled
  end
end

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

Yields:

  • (_self)

Yield Parameters:

  • _self (Footnotes)

    the object that the method was called on



58
59
60
# File 'lib/rails-footnotes.rb', line 58

def self.setup
  yield self
end