Class: Spree::Api::BaseController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Spree::Api::BaseController
- Includes:
- CanCan::ControllerAdditions, Core::ControllerHelpers::Store, Core::ControllerHelpers::StrongParameters
- Defined in:
- app/controllers/spree/api/base_controller.rb
Direct Known Subclasses
AddressesController, CheckoutsController, ClassificationsController, ConfigController, CountriesController, CreditCardsController, ImagesController, InventoryUnitsController, LineItemsController, OptionTypesController, OptionValuesController, OrdersController, PaymentsController, ProductPropertiesController, ProductsController, PromotionsController, PropertiesController, ReturnAuthorizationsController, ShipmentsController, StatesController, StockItemsController, StockLocationsController, StockMovementsController, StockTransfersController, StoreCreditEventsController, StoresController, TaxonomiesController, TaxonsController, TransferItemsController, UsersController, VariantsController, ZonesController
Instance Attribute Summary collapse
-
#current_api_user ⇒ Object
Returns the value of attribute current_api_user.
Instance Method Summary collapse
Instance Attribute Details
#current_api_user ⇒ Object
Returns the value of attribute current_api_user.
19 20 21 |
# File 'app/controllers/spree/api/base_controller.rb', line 19 def current_api_user @current_api_user end |
Instance Method Details
#map_nested_attributes_keys(klass, attributes) ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'app/controllers/spree/api/base_controller.rb', line 36 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 |