Class: Spree::Api::V1::AddressesController
- Inherits:
-
BaseController
- Object
- ActionController::Metal
- BaseController
- Spree::Api::V1::AddressesController
show all
- Defined in:
- app/controllers/spree/api/v1/addresses_controller.rb
Instance Attribute Summary
#current_api_user
Instance Method Summary
collapse
#map_nested_attributes_keys
included
Instance Method Details
#show ⇒ Object
5
6
7
8
|
# File 'app/controllers/spree/api/v1/addresses_controller.rb', line 5
def show
@address = Address.find(params[:id])
authorize! :read, @address
end
|
#update ⇒ Object
10
11
12
13
14
15
|
# File 'app/controllers/spree/api/v1/addresses_controller.rb', line 10
def update
@address = Address.find(params[:id])
authorize! :read, @address
@address.update_attributes(params[:address])
render :show, :status => 200
end
|