Sha256: 15caa3d0255733909fe5c19d9a1b90c2b58da117d7a19b7f2c74d62bc54414af

Contents?: true

Size: 365 Bytes

Versions: 4

Compression:

Stored size: 365 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

4 entries across 4 versions & 1 rubygems

Version Path
iqvoc-4.3.3 app/helpers/link_helper.rb
iqvoc-4.3.2 app/helpers/link_helper.rb
iqvoc-4.3.1 app/helpers/link_helper.rb
iqvoc-4.3.0 app/helpers/link_helper.rb