Module: Renalware::LinkHelper

Defined in:
app/helpers/renalware/link_helper.rb

Instance Method Summary collapse

Instance Method Details

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, options = {}, html_options = {})
  link_to_if(condition, name, options, html_options) do
    (:span, class: "no-permission") { name }
  end
end