Profile model for Devise users?

前端 未结 5 1045
青春惊慌失措
青春惊慌失措 2020-11-28 02:13

I want to extend the sign up form of my devise installation. I created a Profile model and am asking myself now, how can I add specific data of the form to this model. Where

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-28 02:35

    Another way in order not to put building resource in the view is to rewrite the devise controller and to be exact, the new method, all u need to do is to change it to:

     def new
       build_resource({})
       resource.build_profile 
       respond_with self.resource
     end
    

提交回复
热议问题