Hello,
I try this :
redirect_to :action => ‘infos’ , :id => params[:id] , :show =>
“comments#a”
i want this : …/infos/15?show=comments#a
but I have this : …/infos/15?show=comments%23a
Someone could tell me how generate an anchor link ?
Thanks
Hello,
I try this :
redirect_to :action => ‘infos’ , :id => params[:id] , :show =>
“comments#a”
i want this : …/infos/15?show=comments#a
but I have this : …/infos/15?show=comments%23a
Someone could tell me how generate an anchor link ?
Thanks
redirect_to
:action => ‘infos’,
:id => params[:id],
:anchor => ‘a’
=>
app/controller/infos/3#a
docs:
http://api.rubyonrails.com/classes/ActionView/Helpers/UrlHelper.html
Well I saw the page you gave me, but there is nothing about " :anchor "
on this page
Thanks !
I think he meant the other url_for
http://api.rubyonrails.com/classes/ActionController/Base.html#M000174
–
Alex
oo00oo
try
:anchor => the_anchor
Example:
link_to “text”, {:action => ‘show_post’, :anchor =>
last_comment.id}, :class => …
Alain
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs