lib/draper/all_helpers.rb in draper-0.5.0 vs lib/draper/all_helpers.rb in draper-0.7.0

- old
+ new

@@ -1,7 +1,8 @@ module Draper module AllHelpers + # Most of the black magic here thanks to Xavier Shay (@xshay) # Provide access to helper methods from outside controllers and views, # such as in Presenter objects. Rails provides ActionController::Base.helpers, # but this does not include any of our application helpers. def all_helpers @all_helpers_proxy ||= begin @@ -28,10 +29,10 @@ proxy.instance_eval do # A hack since this proxy doesn't pick up default_url_options from anywhere def url_for(*args) if args.last.is_a?(Hash) && !args.last[:only_path] args = args.dup - args << args.pop.merge(host: ActionMailer::Base.default_url_options[:host]) + args << args.pop.merge('host' => ActionMailer::Base.default_url_options[:host]) end super(*args) end end \ No newline at end of file