Rails render of partial and layout in controller

后端 未结 3 369
星月不相逢
星月不相逢 2021-01-04 10:04

I am overriding the create action of the devise Registrations Controller. I have two forms for signup, individual or company, a company has a field called company_form set t

3条回答
  •  借酒劲吻你
    2021-01-04 10:55

    In the end (and i know this is a hack) but i created a partial called _partial_layout_wrapper in my layouts that was an exact copy of the layouts/application file and used this in my controller

    render partial: 'shared/company_signup_form', layout: 'partial_layout_wrapper'
    

    this works but surely this cannot be the way ?

提交回复
热议问题