How to achieve anchor in the html http://localhost:3000/even


#1

I want to have the final URL something like this

http://localhost:3000/event/event_info/100#comment5

  comment_anchor = '#comment5'
  redirect_to :controller => 'event', :action => 'event_info' , :id 

=>
@session[:event_id]

Now how do I pass this comment_anchor as html param to redirect_to ?

Thanks.


#2

Hello Neeraj,

I want to have the final URL something like this

http://localhost:3000/event/event_info/100#comment5

  comment_anchor = '#comment5'
  redirect_to :controller => 'event', :action => 'event_info' , :id =>

@session[:event_id]

Now how do I pass this comment_anchor as html param to redirect_to ?

try :

:anchor => comment_anchor

 -- Jean-François.