Ruby on rails 我可以将_重定向到Rails视图中的特定位置吗
是否可以通过控制器操作将_重定向到rails应用程序视图中的特定位置?例如,在创建记录时,我想使用redirect to指向根路径中的Ruby on rails 我可以将_重定向到Rails视图中的特定位置吗,ruby-on-rails,redirect,methods,path,controller,Ruby On Rails,Redirect,Methods,Path,Controller,是否可以通过控制器操作将_重定向到rails应用程序视图中的特定位置?例如,在创建记录时,我想使用redirect to指向根路径中的,而不是简单地将重定向到根路径尝试在重定向中使用锚定: <%= redirect_to root_path, anchor: ‘some_anchor’ %> 这是否回答了您的问题?
,而不是简单地将重定向到根路径
尝试在重定向中使用锚定
:
<%= redirect_to root_path, anchor: ‘some_anchor’ %>
这是否回答了您的问题?