Class: Spree::Api::V1::BaseController
- Inherits:
-
ActionController::Metal
- Object
- ActionController::Metal
- Spree::Api::V1::BaseController
- Includes:
- ControllerSetup
- Defined in:
- app/controllers/spree/api/v1/base_controller.rb
Direct Known Subclasses
AddressesController, CountriesController, ImagesController, InventoryUnitsController, LineItemsController, OrdersController, PaymentsController, ProductPropertiesController, ProductsController, ReturnAuthorizationsController, ShipmentsController, TaxonomiesController, TaxonsController, VariantsController, ZonesController
Instance Attribute Summary collapse
-
#current_api_user ⇒ Object
Returns the value of attribute current_api_user.
Instance Method Summary collapse
Methods included from ControllerSetup
Instance Attribute Details
#current_api_user ⇒ Object
Returns the value of attribute current_api_user.
7 8 9 |
# File 'app/controllers/spree/api/v1/base_controller.rb', line 7 def current_api_user @current_api_user end |
Instance Method Details
#map_nested_attributes_keys(klass, attributes) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'app/controllers/spree/api/v1/base_controller.rb', line 19 def map_nested_attributes_keys(klass, attributes) nested_keys = klass..keys attributes.inject({}) do |h, (k,v)| key = nested_keys.include?(k.to_sym) ? "#{k}_attributes" : k h[key] = v h end.with_indifferent_access end |