Module: ActionView::Helpers::ConditionalUrlHelper
- Included in:
- ActionView::Helpers
- Defined in:
- lib/workarea/ext/freedom_patches/action_view_conditional_url_helper.rb
Instance Method Summary collapse
- #link_to_if_with_block(condition, link, html_options = {}, &block) ⇒ Object
- #link_to_unless_with_block(condition, link, html_options = {}, &block) ⇒ Object
Instance Method Details
#link_to_if_with_block(condition, link, html_options = {}, &block) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/workarea/ext/freedom_patches/action_view_conditional_url_helper.rb', line 4 def link_to_if_with_block(condition, link, = {}, &block) if condition link_to link, , &block else capture &block end end |
#link_to_unless_with_block(condition, link, html_options = {}, &block) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/workarea/ext/freedom_patches/action_view_conditional_url_helper.rb', line 12 def link_to_unless_with_block(condition, link, = {}, &block) unless condition link_to link, , &block else capture &block end end |