app/helpers/application_helper.rb
def hyperlinks(links={})
    result = {}
    links.each do |qi, val|
      next unless val.present?
      result[qi.to_s] = { 
                 "href" => val.kind_of?(String) ? val : val[:href], 
                 "type" => val.kind_of?(String) ? "application/json" : val[:type]
              }
    end
    result
  end
#
# Used in Jbuilder templates to build hyperlinks
#
Used in Jbuilder templates to build hyperlinks
Used in Jbuilder templates to build hyperlinks
def hyperlinks(links={})
    result = {}
    links.each do |qi, val|
      next unless val.present?
      result[qi.to_s] = { 
                 "href" => val.kind_of?(String) ? val : val[:href], 
                 "type" => val.kind_of?(String) ? "application/json" : val[:type]
              }
    end
    result
  end
def hyperlinks ( links = { } ) result = { } links . each do | qi , val | next unless val . present? result [ qi . to_s ] = { "href" => val . kind_of? ( String ) ? val : val [ :href ] , "type" => val . kind_of? ( String ) ? "application/json" : val [ :type ] } end result end
Used in Jbuilder templates to build hyperlinks
Used in Jbuilder templates to build hyperlinks
links