diff options
author | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:36:34 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:36:34 +0200 |
commit | 63fff600accb41b56a3e6ac403d9b1732de3086d (patch) | |
tree | eabc84f16214eade7d44386de14a23415a9c3e3d /actionview/lib/action_view/helpers/atom_feed_helper.rb | |
parent | 5b6eb1d58b48fada298215b2cccda89f993890c3 (diff) | |
download | rails-63fff600accb41b56a3e6ac403d9b1732de3086d.tar.gz rails-63fff600accb41b56a3e6ac403d9b1732de3086d.tar.bz2 rails-63fff600accb41b56a3e6ac403d9b1732de3086d.zip |
modernizes hash syntax in actionview
Diffstat (limited to 'actionview/lib/action_view/helpers/atom_feed_helper.rb')
-rw-r--r-- | actionview/lib/action_view/helpers/atom_feed_helper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionview/lib/action_view/helpers/atom_feed_helper.rb b/actionview/lib/action_view/helpers/atom_feed_helper.rb index 9a713d573e..46e4172e5d 100644 --- a/actionview/lib/action_view/helpers/atom_feed_helper.rb +++ b/actionview/lib/action_view/helpers/atom_feed_helper.rb @@ -117,8 +117,8 @@ module ActionView xml.feed(feed_opts) do xml.id(options[:id] || "tag:#{request.host},#{options[:schema_date]}:#{request.fullpath.split(".")[0]}") - xml.link(:rel => "alternate", :type => "text/html", :href => options[:root_url] || (request.protocol + request.host_with_port)) - xml.link(:rel => "self", :type => "application/atom+xml", :href => options[:url] || request.url) + xml.link(rel: "alternate", type: "text/html", href: options[:root_url] || (request.protocol + request.host_with_port)) + xml.link(rel: "self", type: "application/atom+xml", href: options[:url] || request.url) yield AtomFeedBuilder.new(xml, self, options) end @@ -138,7 +138,7 @@ module ActionView def method_missing(method, *arguments, &block) if xhtml_block?(method, arguments) @xml.__send__(method, *arguments) do - @xml.div(:xmlns => "http://www.w3.org/1999/xhtml") do |xhtml| + @xml.div(xmlns: "http://www.w3.org/1999/xhtml") do |xhtml| block.call(xhtml) end end @@ -192,7 +192,7 @@ module ActionView type = options.fetch(:type, "text/html") url = options.fetch(:url) { @view.polymorphic_url(record) } - @xml.link(:rel => "alternate", :type => type, :href => url) if url + @xml.link(rel: "alternate", type: type, href: url) if url yield AtomBuilder.new(@xml) end |