Keep params after render Ruby on Rails

前端 未结 2 480
终归单人心
终归单人心 2021-01-18 01:04

I have a Project that belongs to User. In my user view I have a link to add a new project, with the parameter for the user I want to add the project to.

<         


        
2条回答
  •  梦毁少年i
    2021-01-18 01:35

    try

    render :action => "new", :id => @project.id
    

    if its not works for you, then try alternate way to pass the parameter to your render action.

    This can also help you-> Rails 3 Render => New with Parameter

提交回复
热议问题