Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

only add the optiosn if they are not empty

I think this is wrong, but it gets the build passing for now. We should
always add options, but we need to make more guarantees about how the
underlying url helper is called
  • Loading branch information...
commit 280e76e62d26a16d2e4a0ec46cec26c96d256ab5 1 parent b44bfa4
Aaron Patterson tenderlove authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
4 actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
View
@@ -135,7 +135,9 @@ def polymorphic_url(record_or_hash_or_array, options = {})
named_route = build_named_route_call(record_or_hash_or_array, record, inflection, options)
url_options = options.except(:action, :routing_type)
- args << url_options
+ unless url_options.empty?
+ args << url_options
+ end
args.collect! { |a| convert_to_model(a) }
Please sign in to comment.
Something went wrong with that request. Please try again.