Skip to content

Commit

Permalink
Use Hash#merge instead of passing 2 parameters to url_for in require_…
Browse files Browse the repository at this point in the history
…login.
  • Loading branch information
paneidos committed Nov 28, 2011
1 parent e33aeca commit 77b2e18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def require_login
# Extract only the basic url parameters on non-GET requests
protocol = request.ssl? ? "https://" : nil
if request.get?
url = url_for(params, :protocol => protocol)
url = url_for(params.merge(:protocol => protocol))
else
url = url_for(:controller => params[:controller], :action => params[:action], :id => params[:id], :project_id => params[:project_id], :protocol => protocol)
end
Expand Down

0 comments on commit 77b2e18

Please sign in to comment.