Jun 25
RJS redirect_to params contain &
I came across this today when I added a parameter to a RJS page.redirect_to call. It appears that prototype or rails is not properly handling the parameters when there are more than 2. I got around it by using a defined route in the routes.rb that looks like this:
map.route_name 'controller_name/action_name/:foo_id', :controller => 'controller_name', :action => 'action_name'
I had to change the redirect_to in my RJS file from this:
page.redirect_to page_recrawl_path(:foo_id => @foo_id, :bar_id => @bar_id, :bang => true)
To this:
page.redirect_to page_recrawl_path(@foo_id, {:bar_id => @bar_id, :bang => true})
No Comments
Leave a comment