Sha256: 05a684f9ab3caa0c96fe83af970eba3225aaaf83f9eaf44be4fda34ce3283b70

Contents?: true

Size: 475 Bytes

Versions: 12

Compression:

Stored size: 475 Bytes

Contents

module Spree
  module Admin
    class ProductPropertiesController < ResourceController
      belongs_to 'spree/product', :find_by => :slug
      before_action :find_properties
      before_action :setup_property, only: :index, if: -> { can?(:create, model_class) }

      private
        def find_properties
          @properties = Spree::Property.pluck(:name)
        end

        def setup_property
          @product.product_properties.build
        end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
solidus_backend-1.0.7 app/controllers/spree/admin/product_properties_controller.rb
solidus_backend-1.0.6 app/controllers/spree/admin/product_properties_controller.rb
solidus_backend-1.0.5 app/controllers/spree/admin/product_properties_controller.rb
solidus_backend-1.0.4 app/controllers/spree/admin/product_properties_controller.rb
solidus_backend-1.0.3 app/controllers/spree/admin/product_properties_controller.rb
solidus_backend-1.0.2 app/controllers/spree/admin/product_properties_controller.rb
solidus_backend-1.0.1 app/controllers/spree/admin/product_properties_controller.rb
solidus_backend-1.0.0 app/controllers/spree/admin/product_properties_controller.rb
solidus_backend-1.0.0.rc2 app/controllers/spree/admin/product_properties_controller.rb
solidus_backend-1.0.0.rc1 app/controllers/spree/admin/product_properties_controller.rb
solidus_backend-1.0.0.pre3 app/controllers/spree/admin/product_properties_controller.rb
solidus_backend-1.0.0.pre2 app/controllers/spree/admin/product_properties_controller.rb