Sha256: fde7122260acb1e64f2613898fc51e4bdbb70531bc949d2ca90709712aaec329
Contents?: true
Size: 1.61 KB
Versions: 6
Compression:
Stored size: 1.61 KB
Contents
xml.instruct! :xml, :version=>"1.0" xml.rss('version' => "2.0", 'xmlns:opensearch' => "http://a9.com/-/spec/opensearch/1.1/", 'xmlns:atom' => "http://www.w3.org/2005/Atom"){ xml.channel{ xml.title t('answer.user_answer', :login_name => @user.username) xml.link "#{request.protocol}#{request.host_with_port}" + user_answers_path(@user) xml.description "Next-L Enju, an open source integrated library system developed by Project Next-L" xml.language @locale.to_s xml.ttl "60" xml.tag! "atom:link", rel: 'self', href: "#{request.protocol}#{request.host_with_port}#{url_for(params.merge(format: :rss, only_path: true))}" xml.tag! "atom:link", rel: 'alternate', href: "#{request.protocol}#{request.host_with_port}" #xml.tag! "atom:link", rel: 'search', :type => 'application/opensearchdescription+xml', href: "http://#{request.host_with_port}/page/opensearch" unless params[:query].blank? xml.tag! "opensearch:totalResults", @count[:query_result] xml.tag! "opensearch:startIndex", @answers.offset_value + 1 xml.tag! "opensearch:itemsPerPage", @answers.limit_value #xml.tag! "opensearch:Query", :role => 'request', :searchTerms => params[:query], :startPage => (params[:page] || 1) end @answers.each do |answer| xml.item do xml.title answer.body #xml.description(answer.title) # rfc822 xml.pubDate answer.created_at.utc.rfc822 xml.link "#{request.protocol}#{request.host_with_port}" + answer_path(answer) xml.guid "#{request.protocol}#{request.host_with_port}" + answer_path(answer), :isPermaLink => "true" end end } }
Version data entries
6 entries across 6 versions & 1 rubygems