Skip to content

Commit

Permalink
Kernel.returning is deprecated. Just return url explicitly so it work…
Browse files Browse the repository at this point in the history
…s on all Rubies and Railses.
  • Loading branch information
Dave Schweisguth committed Nov 22, 2011
1 parent e6cf4d3 commit 922ddf7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/gravatar.rb
Expand Up @@ -68,18 +68,18 @@ def gravatar_url(email, options={})
email_hash = Digest::MD5.hexdigest(email)
options = DEFAULT_OPTIONS.merge(options)
options[:default] = CGI::escape(options[:default]) unless options[:default].nil?
returning gravatar_api_url(email_hash, options.delete(:ssl)) do |url|
opts = []
[:rating, :size, :default].each do |opt|
unless options[opt].nil?
value = h(options[opt])
opts << [opt, value].join('=')
end
end
url << "?#{opts.join('&')}" unless opts.empty?
url = gravatar_api_url(email_hash, options.delete(:ssl))
opts = []
[:rating, :size, :default].each do |opt|
unless options[opt].nil?
value = h(options[opt])
opts << [opt, value].join('=')
end
end
url << "?#{opts.join('&')}" unless opts.empty?
url
end

end

end
end

0 comments on commit 922ddf7

Please sign in to comment.