How to generate Registration controller of devise gem

Stuart Pontins

I have setup Devise, I have set up the below code in my user.rb file

  def self.create_auto_password
    generated_password = Devise.friendly_token.first(8)
    self.create(password: generated_password, password_confirmation: generated_password)
  end

I then tried to generate a registrations controller by running

rails generate devise:controllers -c registrations

and a few other variations but it won't generate... what is the correct command to create a registrations controller in Devise?

power

just create the controller manually and make it inherit from Devise. For example:

class Users::RegistrationsController < Devise::RegistrationsController
  # Override the action you want here.
end

This controller should live in app/controllers/users/registrations_controller.rb

And mention it in your routes.

devise_for :users, controllers: { registrations: "users/registrations" }

And if you want to only generate it by command than you need to add device gem from master branch because that generator is present on that branch.

gem 'devise', git: 'https://github.com/plataformatec/devise'

As mention on github_issue

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Devise gem registration model issue

From Dev

How can I generate an attribute within Devise registration?

From Dev

How to add a custom field to devise in Rails 4 and customise the registration controller?

From Dev

How to permit params to a specific devise_controller with devise_token_auth gem?

From Dev

Pass more params from devise registration controller

From Dev

undefined method `users_url' for Devise Registration Controller

From Dev

Ruby on Rails: Custom Devise Registration Controller, Asking For Create Action

From Dev

undefined method `users_url' for Devise Registration Controller

From Dev

Render Single Input from Devise registration edit in different Controller

From Dev

Is it possible to hook up Devise Registration Controller with Administrate dashboard?

From Dev

how to create a model after a devise registration

From Dev

Proper way of rails routing custom Users controller and devise gem

From Dev

How to add username field to devise gem?

From Dev

how to add users after signing in in devise gem?

From Dev

how to check email exist in rails, devise gem

From Dev

How to use devise parent_controller for devise inherited controller but skip for ActiveAdmin devise controller?

From Dev

How to Generate nokogumbo Gem File

From Dev

Can not get new user registration to create user to database using Devise Gem

From Dev

how to access the devise @user instance variable outside of the devise controller & templates

From Dev

how to create users_controller.rb with devise?

From Dev

how to create users_controller.rb with devise?

From Dev

How to solve argument error in Devise Registrations controller?

From Dev

How to setup angular-rails 4.2 - devise registration/authentication?

From Dev

How do I validate certain fields with rails devise on registration only

From Dev

How to restrict registration and create own sign up in devise?

From Dev

Translate devise labels in registration?

From Dev

Devise registration for with nested entity

From Dev

When overriding the registration controller from devise, is it possible to access the newly created user on the create action?

From Dev

Devise Registration Controller - Split full name and populate first and last name attributes

Related Related

  1. 1

    Devise gem registration model issue

  2. 2

    How can I generate an attribute within Devise registration?

  3. 3

    How to add a custom field to devise in Rails 4 and customise the registration controller?

  4. 4

    How to permit params to a specific devise_controller with devise_token_auth gem?

  5. 5

    Pass more params from devise registration controller

  6. 6

    undefined method `users_url' for Devise Registration Controller

  7. 7

    Ruby on Rails: Custom Devise Registration Controller, Asking For Create Action

  8. 8

    undefined method `users_url' for Devise Registration Controller

  9. 9

    Render Single Input from Devise registration edit in different Controller

  10. 10

    Is it possible to hook up Devise Registration Controller with Administrate dashboard?

  11. 11

    how to create a model after a devise registration

  12. 12

    Proper way of rails routing custom Users controller and devise gem

  13. 13

    How to add username field to devise gem?

  14. 14

    how to add users after signing in in devise gem?

  15. 15

    how to check email exist in rails, devise gem

  16. 16

    How to use devise parent_controller for devise inherited controller but skip for ActiveAdmin devise controller?

  17. 17

    How to Generate nokogumbo Gem File

  18. 18

    Can not get new user registration to create user to database using Devise Gem

  19. 19

    how to access the devise @user instance variable outside of the devise controller & templates

  20. 20

    how to create users_controller.rb with devise?

  21. 21

    how to create users_controller.rb with devise?

  22. 22

    How to solve argument error in Devise Registrations controller?

  23. 23

    How to setup angular-rails 4.2 - devise registration/authentication?

  24. 24

    How do I validate certain fields with rails devise on registration only

  25. 25

    How to restrict registration and create own sign up in devise?

  26. 26

    Translate devise labels in registration?

  27. 27

    Devise registration for with nested entity

  28. 28

    When overriding the registration controller from devise, is it possible to access the newly created user on the create action?

  29. 29

    Devise Registration Controller - Split full name and populate first and last name attributes

HotTag

Archive