ruby-on-rails – Rails:redirect_to特定的Twitter Bootstrap选
发布时间:2020-12-17 01:47:27 所属栏目:百科 来源:网络整理
导读:如何将重定向更改为特定页面上的特定Twitter Bootstrap选项卡?就像是: def destroy @custom_article = CustomArticle.find(params[:id]) @custom_article.destroy respond_to do |format| format.html { redirect_to documents_url[#specific_tab_here?] }
如何将重定向更改为特定页面上的特定Twitter Bootstrap选项卡?就像是:
def destroy @custom_article = CustomArticle.find(params[:id]) @custom_article.destroy respond_to do |format| format.html { redirect_to documents_url[#specific_tab_here?] } format.json { head :no_content } end end 谢谢! UPDATE 请参阅@ PeterWong和@ emm的答案,以获得解决方案. 解决方法
这个怎么样?
redirect_to "#{documents_url}#specific_tab" (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |