Module: Interdasting::ApplicationHelper
- Defined in:
- app/helpers/interdasting/application_helper.rb
Instance Method Summary collapse
- #action_id(action) ⇒ Object
- #controller_id(controller) ⇒ Object
- #doc_id(doc) ⇒ Object
- #method_id(action, method) ⇒ Object
- #web_safe(string) ⇒ Object
Instance Method Details
#action_id(action) ⇒ Object
12 13 14 |
# File 'app/helpers/interdasting/application_helper.rb', line 12 def action_id(action) "#{controller_id(action.controller)}_action_#{web_safe(action.name)}" end |
#controller_id(controller) ⇒ Object
7 8 9 10 |
# File 'app/helpers/interdasting/application_helper.rb', line 7 def controller_id(controller) "#{doc_id(controller.documentation)}_controller_"\ "#{web_safe(controller.name)}" end |
#doc_id(doc) ⇒ Object
3 4 5 |
# File 'app/helpers/interdasting/application_helper.rb', line 3 def doc_id(doc) "version_#{web_safe(doc.version)}" end |
#method_id(action, method) ⇒ Object
16 17 18 |
# File 'app/helpers/interdasting/application_helper.rb', line 16 def method_id(action, method) "#{action_id(action)}_method_#{web_safe(method)}" end |
#web_safe(string) ⇒ Object
20 21 22 |
# File 'app/helpers/interdasting/application_helper.rb', line 20 def web_safe(string) string.to_s.humanize.sub(' ', '').underscore end |