Sha256: cd059ef54f6d0cc86ac1c2080b68cb7b8e046b19a3a3a5d25d7f03592d669910

Contents?: true

Size: 433 Bytes

Versions: 7

Compression:

Stored size: 433 Bytes

Contents

module Authz
  module Helpers
    module ViewHelpers

      def authz_link_to(name, options = {}, html_options = {}, using: nil, skip_scoping: nil)
        url = url_for(options)
        method = html_options[:method] || html_options['method']
        authorized = authorized_path? url, method: method, using: using, skip_scoping: skip_scoping
        link_to(name, options, html_options) if authorized
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
authz-0.0.2 lib/authz/helpers/view_helpers.rb
authz-0.0.1 lib/authz/helpers/view_helpers.rb
authz-0.0.1.alpha5 lib/authz/helpers/view_helpers.rb
authz-0.0.1.alpha4 lib/authz/helpers/view_helpers.rb
authz-0.0.1.alpha3 lib/authz/helpers/view_helpers.rb
authz-0.0.1.alpha2 lib/authz/helpers/view_helpers.rb
authz-0.0.1.alpha lib/authz/helpers/view_helpers.rb