Method: Padrino::Helpers::AssetTagHelpers#feed_tag
- Defined in:
- padrino-helpers/lib/padrino-helpers/asset_tag_helpers.rb
permalink #feed_tag(mime, url, options = {}) ⇒ String
Creates a link tag that browsers and news readers can use to auto-detect an RSS or ATOM feed.
@param options
The options for the feed tag.
117 118 119 120 |
# File 'padrino-helpers/lib/padrino-helpers/asset_tag_helpers.rb', line 117 def feed_tag(mime, url, ={}) full_mime = (mime == :atom) ? 'application/atom+xml' : 'application/rss+xml' tag(:link, { :rel => 'alternate', :type => full_mime, :title => mime, :href => url }.update()) end |