0

I'm in the process of implementing Devise into a Rails app, and all the files generated by Devise just seem to reference a superclass, as in

  class Users::SessionsController < Devise::SessionsController
    before_action :configure_sign_in_params, only: [:create]

    def new
      super
    end

which is fine, but when I search my project directory for Devise::SessionsController (or any of the other classes referenced) it's nowhere to be found. Am I missing something? Thanks for any help.

  • you should read this http://stackoverflow.com/questions/3408868/where-do-gems-install – rails_id Mar 16 '17 at 00:48
  • Devise controller are not inside your app, if you need to modify a method, just create a normal controller for user and replace the method name, for example create, show, etc or add new methods if you need to, also make sure in the routes you specify which controller you want to use, `devise_for :users, :controllers => { :registrations => 'Users' }` , taken from the following question -> [link](http://stackoverflow.com/questions/6234045/how-do-you-access-devise-controllers) – kparekh01 Mar 16 '17 at 00:55
  • Yep that's where they are. Thanks! –  Mar 16 '17 at 01:01

1 Answers1

0

If you're looking for the actual code, https://github.com/plataformatec/devise/blob/master/app/controllers/devise/sessions_controller.rb

On your machine I believe the gem is installed somewhere in your ruby directory. See here and here for a little more information.

Will Wilson
  • 335
  • 2
  • 9