Module: Erector::Helpers
- Included in:
- Widget
- Defined in:
- lib/erector/helpers.rb
Instance Method Summary collapse
- #cycle(*args) ⇒ Object
- #error_messages_for(*args) ⇒ Object
- #flash ⇒ Object
- #form_for(*args, &block) ⇒ Object
- #javascript_include_merged(key) ⇒ Object
- #pluralize(*args) ⇒ Object
- #session ⇒ Object
- #simple_format(string) ⇒ Object
- #stylesheet_link_merged(key) ⇒ Object
- #time_ago_in_words(*args) ⇒ Object
Instance Method Details
#cycle(*args) ⇒ Object
55 56 57 |
# File 'lib/erector/helpers.rb', line 55 def cycle(*args) helpers.cycle(*args) end |
#error_messages_for(*args) ⇒ Object
27 28 29 30 31 |
# File 'lib/erector/helpers.rb', line 27 def (*args) fake_erbout do helpers.(*args) end end |
#flash ⇒ Object
47 48 49 |
# File 'lib/erector/helpers.rb', line 47 def flash helpers.controller.send(:flash) end |
#form_for(*args, &block) ⇒ Object
33 34 35 36 37 |
# File 'lib/erector/helpers.rb', line 33 def form_for(*args, &block) fake_erbout do helpers.form_for(*args, &block) end end |
#javascript_include_merged(key) ⇒ Object
39 40 41 |
# File 'lib/erector/helpers.rb', line 39 def javascript_include_merged(key) helpers.javascript_include_merged(key) end |
#pluralize(*args) ⇒ Object
67 68 69 |
# File 'lib/erector/helpers.rb', line 67 def pluralize(*args) helpers.pluralize(*args) end |
#session ⇒ Object
51 52 53 |
# File 'lib/erector/helpers.rb', line 51 def session helpers.controller.session end |
#simple_format(string) ⇒ Object
59 60 61 |
# File 'lib/erector/helpers.rb', line 59 def simple_format(string) p raw(string.to_s.html_escape.gsub(/\r\n?/, "\n").gsub(/\n/, "<br/>\n")) end |
#stylesheet_link_merged(key) ⇒ Object
43 44 45 |
# File 'lib/erector/helpers.rb', line 43 def stylesheet_link_merged(key) helpers.stylesheet_link_merged(key) end |
#time_ago_in_words(*args) ⇒ Object
63 64 65 |
# File 'lib/erector/helpers.rb', line 63 def time_ago_in_words(*args) helpers.time_ago_in_words(*args) end |