Rails: Access parameters in view after form submission

為{幸葍}努か 提交于 2019-12-05 16:14:18

You're redirecting to a different action - this will reset all the parameters you passed to the create action.

Either pass hash_name as a parameter like the other answer suggests, or just fetch it straight from the @site object.

Just append them to the options:

redirect_to @site, :hash_name => params[:hash_name]

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!