Sha256: cbca3b568431a20efd51dfaeb0c64b11c39d6e29a014a77eb4861345e2f79cfa

Contents?: true

Size: 356 Bytes

Versions: 17

Compression:

Stored size: 356 Bytes

Contents

module LinkHelper
  def link_to_object(object, name, html_options = nil, &block)
    path = case object
    when Iqvoc::Concept.base_class
      concept_path(id: object)
    when Iqvoc::Collection.base_class
      collection_path(id: object)
    when Label::Base
      label_path(id: object)
    end

    link_to name, path, html_options, &block
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
iqvoc-4.13.0 app/helpers/link_helper.rb
iqvoc-4.12.1 app/helpers/link_helper.rb
iqvoc-4.12.0 app/helpers/link_helper.rb
iqvoc-4.11.1 app/helpers/link_helper.rb
iqvoc-4.11.0 app/helpers/link_helper.rb
iqvoc-4.10.0 app/helpers/link_helper.rb
iqvoc-4.9.0 app/helpers/link_helper.rb
iqvoc-4.8.2 app/helpers/link_helper.rb
iqvoc-4.8.1 app/helpers/link_helper.rb
iqvoc-4.8.0 app/helpers/link_helper.rb
iqvoc-4.7.0 app/helpers/link_helper.rb
iqvoc-4.6.1 app/helpers/link_helper.rb
iqvoc-4.5.2 app/helpers/link_helper.rb
iqvoc-4.6.0 app/helpers/link_helper.rb
iqvoc-4.5.1 app/helpers/link_helper.rb
iqvoc-4.5.0 app/helpers/link_helper.rb
iqvoc-4.4.0 app/helpers/link_helper.rb