Module: Renalware::LinkHelper
- Defined in:
- app/helpers/renalware/link_helper.rb
Instance Method Summary collapse
-
#link_to_if_allowed(condition, name, options = {}, html_options = {}) ⇒ Object
A wrapper around link_to_if that will output greyed-out text to indicate the option is not permitted if condition is falsey.
Instance Method Details
#link_to_if_allowed(condition, name, options = {}, html_options = {}) ⇒ Object
A wrapper around link_to_if that will output greyed-out text to indicate the option is not permitted if condition is falsey.
7 8 9 10 11 |
# File 'app/helpers/renalware/link_helper.rb', line 7 def link_to_if_allowed(condition, name, = {}, = {}) link_to_if(condition, name, , ) do tag.span(class: "no-permission") { name } end end |