R
R
Roman Volkov2015-06-19 22:25:36
Ruby on Rails
Roman Volkov, 2015-06-19 22:25:36

How to create a user in rails using devise?

The bottom line is this: I have a gem devise set up. I need the ability to create other users from under the admin account. But when I write form_for(User.new) - and try to create a user - I get the error "You are already logged in"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
Zakhar Orlov, 2015-06-20
@white_wolf_17

Check the routes, you need to prefix

devise_for :users, :path_prefix => 'my'
resources :users

or
devise_for :users
scope "/admin" do
  resources :users
end

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question