Class: Spree::Api::AddressesController
Instance Attribute Summary
#current_api_user
Instance Method Summary
collapse
#map_nested_attributes_keys, #permitted_line_item_attributes
included
Instance Method Details
#show ⇒ Object
6
7
8
9
10
|
# File 'app/controllers/spree/api/addresses_controller.rb', line 6
def show
authorize! :read, @order, order_token
find_address
respond_with(@address)
end
|
#update ⇒ Object
12
13
14
15
16
17
18
19
20
21
|
# File 'app/controllers/spree/api/addresses_controller.rb', line 12
def update
authorize! :update, @order, order_token
find_address
if @address.update_attributes(address_params)
respond_with(@address, :default_template => :show)
else
invalid_resource!(@address)
end
end
|