Must explicitly call routing proxy method to get access to routes for engines.

Cannot simply pass :use_route => :engine_name to params.
This commit is contained in:
Ryan Bigg 2012-04-02 15:13:35 -05:00
parent 82d2a806da
commit f3da0b529f
1 changed files with 6 additions and 2 deletions

View File

@ -59,10 +59,14 @@ module Ransack
options.merge!(
:q => search_params.merge(:s => "#{attr_name} #{new_dir}")
)
options.merge!(:use_route => routing_proxy) if routing_proxy
url = if routing_proxy
send(routing_proxy).url_for(options)
else
url_for(options)
end
link_to [ERB::Util.h(name), order_indicator_for(current_dir)].compact.join(' ').html_safe,
url_for(options),
url,
html_options
end