Module: Mockup::MockupHelper
- Defined in:
- app/helpers/mockup/mockup_helper.rb
Instance Method Summary collapse
Instance Method Details
#current_mockup_page?(*names) ⇒ Boolean
7 8 9 10 11 12 |
# File 'app/helpers/mockup/mockup_helper.rb', line 7 def current_mockup_page? *names # names = [names] unless names.respond_to? :each included = names.inject(false) {|ans, name| ans ||= (url_for(action: action_name) == mockup_path(name)) } included ? "current" : '' end |
#link_to_mockup(display, name = display, *args) ⇒ Object
3 4 5 |
# File 'app/helpers/mockup/mockup_helper.rb', line 3 def link_to_mockup display, name=display, *args link_to display, mockup_path(name), *args end |