Class: Spree::Api::V2::Storefront::CheckInsController
- Inherits:
-
ResourceController
- Object
- ResourceController
- Spree::Api::V2::Storefront::CheckInsController
- Defined in:
- app/controllers/spree/api/v2/storefront/check_ins_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/controllers/spree/api/v2/storefront/check_ins_controller.rb', line 13 def create :create, SpreeCmCommissioner::CheckIn check_in = spree_current_user.check_ins.build(check_in_attributes) if check_in.save render_serialized_payload { serialize_resource(check_in) } else render_error_payload(check_in.errors..to_sentence) end end |
#show ⇒ Object
8 9 10 11 |
# File 'app/controllers/spree/api/v2/storefront/check_ins_controller.rb', line 8 def show :show, resource super end |