Module: Excursion::Helpers

Defined in:
lib/excursion/helpers.rb,
lib/excursion/helpers/url_helper.rb,
lib/excursion/helpers/javascript_helper.rb,
lib/excursion/helpers/application_helper.rb

Defined Under Namespace

Modules: ApplicationHelper, JavascriptHelper Classes: UrlHelper

Class Method Summary collapse

Class Method Details

.helper(name) ⇒ Object



11
12
13
# File 'lib/excursion/helpers.rb', line 11

def self.helper(name)
  helpers[name]
end

.helpersObject



7
8
9
# File 'lib/excursion/helpers.rb', line 7

def self.helpers
  @helpers ||= {}
end

.register_helper(h) ⇒ Object

Helpers register themselves here when they’re created so they can be shared between different instances (like the StaticHelper below and ActionController)



17
18
19
20
21
# File 'lib/excursion/helpers.rb', line 17

def self.register_helper(h)
  @helpers ||= {}
  @helpers[h.application.name] = h
  h
end