Sha256: 05048dc45a4acb91304ce0fe3453e3d7db79ed1329ebbdab13d69dec2a5c0b2c

Contents?: true

Size: 420 Bytes

Versions: 18

Compression:

Stored size: 420 Bytes

Contents

# frozen_string_literal: true

module Renalware
  module LinkHelper
    # A wrapper around link_to_if that will output greyed-out text to indicate the option is
    # not permitted if condition is falsey.
    def link_to_if_allowed(condition, name, options = {}, html_options = {})
      link_to_if(condition, name, options, html_options) do
        tag.span(class: "no-permission") { name }
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
renalware-core-2.1.1 app/helpers/renalware/link_helper.rb
renalware-core-2.1.0 app/helpers/renalware/link_helper.rb
renalware-core-2.0.167 app/helpers/renalware/link_helper.rb
renalware-core-2.0.166 app/helpers/renalware/link_helper.rb
renalware-core-2.0.165 app/helpers/renalware/link_helper.rb
renalware-core-2.0.164 app/helpers/renalware/link_helper.rb
renalware-core-2.0.163 app/helpers/renalware/link_helper.rb
renalware-core-2.0.162 app/helpers/renalware/link_helper.rb
renalware-core-2.0.161 app/helpers/renalware/link_helper.rb
renalware-core-2.0.160 app/helpers/renalware/link_helper.rb
renalware-core-2.0.159 app/helpers/renalware/link_helper.rb
renalware-core-2.0.158 app/helpers/renalware/link_helper.rb
renalware-core-2.0.157 app/helpers/renalware/link_helper.rb
renalware-core-2.0.156 app/helpers/renalware/link_helper.rb
renalware-core-2.0.155 app/helpers/renalware/link_helper.rb
renalware-core-2.0.153 app/helpers/renalware/link_helper.rb
renalware-core-2.0.152 app/helpers/renalware/link_helper.rb
renalware-core-2.0.151 app/helpers/renalware/link_helper.rb