app/helpers/catalog_helper.rb
def generic_link(options = {})
    field_data = options[:value]
    contents = field_data.map do |item|
      json = JSON.parse item
      link_to json['text'], json['url']
    end
    content_tag 'span', contents.join('<br>'), nil, false
  end
# Make a link out of a url and text
Make a link out of a url and text
Make a link out of a url and text
def generic_link(options = {})
    field_data = options[:value]
    contents = field_data.map do |item|
      json = JSON.parse item
      link_to json['text'], json['url']
    end
    content_tag 'span', contents.join('<br>'), nil, false
  end
def generic_link ( options = { } ) field_data = options [ :value ] contents = field_data . map do | item | json = JSON . parse item link_to json [ 'text' ] , json [ 'url' ] end content_tag 'span' , contents . join ( '<br>' ) , nil , false end
Make a link out of a url and text
Make a link out of a url and text
options