app/helpers/application_helper.rb
# NOTE - these two methods are TOTALLY DUPLICATED in application_controller....
# Until we fix that, best to keep them perfectly in-sync
these two methods are TOTALLY DUPLICATED in application_controller
Until we fix that, best to keep them perfectly in-sync
these two methods are TOTALLY DUPLICATED in application_controller Until we fix that best to keep them perfectly in - sync
def link_to_item(item, options = {})
    case item
    when Collection
      collection_url(item, options)
    when Community
      community_url(item, options)
    when DataObject
      data_object_url(item.latest_published_version_in_same_language || item, options)
    when User
      user_url(item, options)
    when TaxonConcept
      taxon_url(item, options)
    when UserAddedData
      options.merge!(anchor: item.anchor)
      taxon_data_url(item.taxon_concept, options)
    when DataPointUri
      options.merge!(anchor: item.anchor)
      taxon_data_url(item.taxon_concept, options)
    when Resource
      content_partner_resource_url(options[:content_partner], item)
    else
      raise EOL::Exceptions::ObjectNotFound
    end
  end
def link_to_item ( item , options = { } ) case item when Collection collection_url ( item , options ) when Community community_url ( item , options ) when DataObject data_object_url ( item . latest_published_version_in_same_language || item , options ) when User user_url ( item , options ) when TaxonConcept taxon_url ( item , options ) when UserAddedData options . merge! ( anchor : item . anchor ) taxon_data_url ( item . taxon_concept , options ) when DataPointUri options . merge! ( anchor : item . anchor ) taxon_data_url ( item . taxon_concept , options ) when Resource content_partner_resource_url ( options [ :content_partner ] , item ) else raise EOL :: Exceptions :: ObjectNotFound end end
NOTE - these two methods are TOTALLY DUPLICATED in application_controller....
Until we fix that, best to keep them perfectly in-sync
NOTE - these two methods are TOTALLY DUPLICATED in application_controller .... Until we fix that best to keep them perfectly in - sync
item
<not_specific>
options
<not_specific>