Hi,
The following link
<%= link_to "Login to comment", :url => new_session_url(:return_to => request.request_uri, :anchor => 'commentForm'), :method => :get, :html => { :id => 'login_to_comment'} %>
generates the following url:
http://localhost:3000/session/new?return_to=%2Fnature_photos%2Fsdfds#commentForm
and the parameters are as below from the logs.
Processing SessionsController#new (for 127.0.0.1 at 2009-07-16 02:04:44) [GET]
Parameters: {"return_to"=>"/nature_photos/sdfds", "action"=>"new", "controller"=>"sessions"}
Completed in 74721ms (View: 15, DB: 0) | 200 OK [http://localhost/session/new?return_to=%2Fnature_photos%2Fsdfds]
Here I need that #commentForm anchor is excluded from the parameter return_to
I need to get that value to scroll down to the comment form at the bottom of the page.