Rendering the Devise edit Password Form

后端 未结 1 874
抹茶落季
抹茶落季 2021-01-03 04:18

I\'m trying to render the Devise edit password form within another view because I don\'t want to duplicate the edit pw logic.

I\'ve tried the following (after genera

相关标签:
1条回答
  • 2021-01-03 04:18

    Try this:

    <%= render :template => 'devise/passwords/edit', 
                            :locals => { 
                              :resource => my_user_model_variable, 
                              :resource_name => my_user_model_name } %>
    

    Where:

    • my_user_model_variable could be current_user
    • my_user_model_name could be "User"
    0 讨论(0)
提交回复
热议问题