Class: Sprangular::AccountsController
Instance Method Summary
collapse
#invalid_resource!, #not_found, #unauthorized
Instance Method Details
#create ⇒ Object
4
5
6
7
8
9
10
11
|
# File 'app/controllers/sprangular/accounts_controller.rb', line 4
def create
@user = Spree::User.create(spree_user_params)
sign_in(:spree_user, @user) if @user.persisted?
@order = current_order
render 'show'
end
|
#show ⇒ Object
13
14
15
16
|
# File 'app/controllers/sprangular/accounts_controller.rb', line 13
def show
authorize! :show, @user
@order = current_order
end
|
#update ⇒ Object
18
19
20
21
22
23
24
|
# File 'app/controllers/sprangular/accounts_controller.rb', line 18
def update
authorize! :update, @user
@user.update_attributes spree_user_params
@order = current_order
render 'show'
end
|