Sha256: 80b72fd696d0151f121a63e228f0bdb4140d6127656913fd9e78cd5f9a38d35d

Contents?: true

Size: 594 Bytes

Versions: 107

Compression:

Stored size: 594 Bytes

Contents

module Spree
  module Admin
    class PrototypesController < ResourceController
      def show
        if request.xhr?
          render layout: false
        else
          redirect_to admin_prototypes_path
        end
      end

      def available
        @prototypes = Prototype.order('name asc')
        respond_with(@prototypes) do |format|
          format.html { render layout: !request.xhr? }
          format.js
        end
      end

      def select
        @prototype ||= Prototype.find(params[:id])
        @prototype_properties = @prototype.properties
      end
    end
  end
end

Version data entries

107 entries across 107 versions & 3 rubygems

Version Path
spree_backend-4.0.9 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.1.15 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.2.7 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.2.6 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.2.5 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.1.14 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.0.8 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.2.4 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-3.7.14.1 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.2.3.1 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.1.13.1 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.0.7.1 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.2.3 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.2.2 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.2.1 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.0.7 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-3.7.14 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.2.0 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.2.0.rc5 app/controllers/spree/admin/prototypes_controller.rb
spree_backend-4.2.0.rc4 app/controllers/spree/admin/prototypes_controller.rb