Rails 3 does not start user registration edit path

I have a pretty direct app with pairs of Devise settings.

First, I created a registration controller that class RegistrationsController < Devise::RegistrationsControllerinherits from Devise. I created this controller so that I can edit users without re-submitting passwords. https://gist.github.com/1514687

I also did this on my routes:

devise_for :users, :controllers => { :registrations => "registrations" }`

Registration works fine, but when I call the following:

<p class="edit"><%= link_to "Edit", edit_user_registration_path(user) %></p>

URL he spits out (works on localhost): http://localhost:3000/users/edit.2

Any ideas here?

0
source share
2 answers

, - , "" ,

- :

rails g controller accounts
resources :accounts

def edit
 @user = User.find(params[:id]
end

( , @user , )

+2

routes.rb ,

resources :users

devise_for, :

devise_for :users, :controllers => { :registrations => "registrations" }
resources :users
0

Source: https://habr.com/ru/post/1531686/


All Articles