开发者

Redirect to index#tab1

This must be simple, but how can i do a redirect to http://myURL/index#tab1 without having to specify a url ?

I tried something like :

redirect_to :action=> 'index#tab1'

But it thinks it's an action an开发者_开发知识库d does not work (because of the # symbol actually).

Any ideas ?


You should be able to do:

redirect_to :action => 'index', :anchor => "tab1"


Perhaps this:

redirect_to 'index#tab1'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜