Redirect to index # tab1

It should be simple, but how can I redirect to http: // myURL / index # tab1 without specifying a url?

I tried something like:

redirect_to :action=> 'index#tab1'

But he considers this an action and does not work (due to the # character actually).

Any ideas?

+3
source share
2 answers

You must be able to:

redirect_to :action => 'index', :anchor => "tab1"
+3
source

Perhaps it:

redirect_to 'index#tab1'
+1
source

Source: https://habr.com/ru/post/1783054/


All Articles