dimanche 25 octobre 2015

Rails gem controller

I'm learning how to build a rails gem (engine, to be more specific). I first read some existing open source code like Devise, but I can't understand the controllers inside. In Devise/app/controllers there is devise_controller.rb with module hierarchy

 class DeviseController < Devise.parent_controller.constantize

but in Devise/lib/devise/controllers/ there are also many controllers with module hierarchy

module Devise 
  module Controllers

what's the difference between these controllers(like which is called when I get "users/sign_up")? Can someone who has experience more than using Devise according to tutorial explain?

Aucun commentaire:

Enregistrer un commentaire