Module: Authz::Helpers::ViewHelpers
- Defined in:
- lib/authz/helpers/view_helpers.rb
Overview
View Helpers that are made available to the host application
Instance Method Summary collapse
-
#authz_link_to(name, options = {}, html_options = {}, using: nil, skip_scoping: nil) ⇒ Object
Renders a link if user is authorized or does nothing otherwise.
Instance Method Details
#authz_link_to(name, options = {}, html_options = {}, using: nil, skip_scoping: nil) ⇒ Object
Renders a link if user is authorized or does nothing otherwise
12 13 14 15 16 17 |
# File 'lib/authz/helpers/view_helpers.rb', line 12 def authz_link_to(name, = {}, = {}, using: nil, skip_scoping: nil) url = url_for() method = [:method] || ['method'] = url, method: method, using: using, skip_scoping: skip_scoping link_to(name, , ) if end |