How to use Ruby on Rails after editing my information I use the gem to edit the user page ?
I thought how to do this.
First, make a registration controller my_devise in a new folder named in your
app / controllers
Transfer the code> folder, and the newly generated
registration controller to that folder.
Next, open
registration controller , and change the content to
class MyDevise :: Registration Controller & lt; Devise :: RegistrationsController protected def after_update_path_for (resource) user_path (resource) and end
Now, app / view / devise / registrations Code in a new folder named App / View / my_devise / registration > Folder, but Sessions Sessions and Shared Skip Folders Code> Folder
Then, in the config / routes.rb file, line devise_for: users to devise_for: users,: controllers = & Gt; ; {: Registration = & gt; "My_devise / registration"}.
And that's it! I think I have covered it all.
No comments:
Post a Comment