Class: Spree::Api::V2::OptionTypesController
- Inherits:
-
BaseController
- Object
- BaseController
- BaseController
- Spree::Api::V2::OptionTypesController
- Defined in:
- app/controllers/spree/api/v2/option_types_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
7 8 9 |
# File 'app/controllers/spree/api/v2/option_types_controller.rb', line 7 def index render_collection option_types.includes(:option_values, :products) end |
#show ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/controllers/spree/api/v2/option_types_controller.rb', line 11 def show if params[:option_value_id] render_instance Spree::OptionValue.find(params[:option_value_id]).option_type else render_instance option_types.find(params[:id]) end end |