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