Method: Spree::Api::ApiHelpers#variant_attributes
- Defined in:
- app/helpers/spree/api/api_helpers.rb
#variant_attributes ⇒ Object
63 64 65 66 67 68 69 70 |
# File 'app/helpers/spree/api/api_helpers.rb', line 63 def variant_attributes preference_attributes = Spree::Api::Config.variant_attributes if @current_user_roles&.include?("admin") preference_attributes + [:cost_price] else preference_attributes end end |