Module: Devise::Controllers::Common
- Defined in:
- lib/devise/controllers/common.rb
Overview
Common actions shared between Devise controllers
Instance Method Summary collapse
-
#create ⇒ Object
POST /resource/controller.
-
#new ⇒ Object
GET /resource/controller/new.
Instance Method Details
#create ⇒ Object
POST /resource/controller
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/devise/controllers/common.rb', line 12 def create self.resource = resource_class.send(send_instructions_with, params[resource_name]) if resource.errors.empty? :notice, :send_instructions redirect_to new_session_path(resource_name) else render_with_scope :new end end |
#new ⇒ Object
GET /resource/controller/new
6 7 8 9 |
# File 'lib/devise/controllers/common.rb', line 6 def new build_resource render_with_scope :new end |