Sha256: 508c9e4ae461fed5852456c6d91fe32efd773d24cdc684f82b8e6e4d1ad527c9

Contents?: true

Size: 521 Bytes

Versions: 74

Compression:

Stored size: 521 Bytes

Contents

require 'spree/api/responders'

module Spree
  module Api
    module ControllerSetup
      def self.included(klass)
        klass.class_eval do
          include CanCan::ControllerAdditions
          include Spree::Core::ControllerHelpers::Auth

          prepend_view_path Rails.root + 'app/views'
          append_view_path File.expand_path('../../../app/views', File.dirname(__FILE__))

          self.responder = Spree::Api::Responders::AppResponder
          respond_to :json
        end
      end
    end
  end
end

Version data entries

74 entries across 74 versions & 1 rubygems

Version Path
spree_api-4.0.9 lib/spree/api/controller_setup.rb
spree_api-4.1.15 lib/spree/api/controller_setup.rb
spree_api-4.1.14 lib/spree/api/controller_setup.rb
spree_api-4.0.8 lib/spree/api/controller_setup.rb
spree_api-3.7.14.1 lib/spree/api/controller_setup.rb
spree_api-4.1.13.1 lib/spree/api/controller_setup.rb
spree_api-4.0.7.1 lib/spree/api/controller_setup.rb
spree_api-4.0.7 lib/spree/api/controller_setup.rb
spree_api-3.7.14 lib/spree/api/controller_setup.rb
spree_api-4.1.13 lib/spree/api/controller_setup.rb
spree_api-4.0.6 lib/spree/api/controller_setup.rb
spree_api-3.7.13 lib/spree/api/controller_setup.rb
spree_api-4.0.5 lib/spree/api/controller_setup.rb
spree_api-4.1.12 lib/spree/api/controller_setup.rb
spree_api-3.7.12 lib/spree/api/controller_setup.rb
spree_api-4.0.4 lib/spree/api/controller_setup.rb
spree_api-3.7.11 lib/spree/api/controller_setup.rb
spree_api-4.1.11 lib/spree/api/controller_setup.rb
spree_api-4.1.10 lib/spree/api/controller_setup.rb
spree_api-4.1.9 lib/spree/api/controller_setup.rb