Class: Spree::UserSessionsController
- Inherits:
-
Devise::SessionsController
- Object
- Devise::SessionsController
- Spree::UserSessionsController
- Includes:
- Core::ControllerHelpers, Core::CurrentOrder
- Defined in:
- app/controllers/spree/user_sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/spree/user_sessions_controller.rb', line 12 def create authenticate_user! if user_signed_in? respond_to do |format| format.html { flash.notice = t(:logged_in_succesfully) redirect_back_or_default(products_path) } format.js { user = resource.record render :json => {:ship_address => user.ship_address, :bill_address => user.bill_address}.to_json } end else flash.now[:error] = t('devise.failure.invalid') render :new end end |
#nav_bar ⇒ Object
32 33 34 |
# File 'app/controllers/spree/user_sessions_controller.rb', line 32 def render :partial => 'spree/shared/nav_bar' end |