Sha256: bfc42cb9c136a3d8ecfbfcaa7bd39fc82df3137e37dc70c337038ecfab1ee169

Contents?: true

Size: 521 Bytes

Versions: 100

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

100 entries across 100 versions & 1 rubygems

Version Path
spree_api-3.1.0.rc4 lib/spree/api/controller_setup.rb
spree_api-3.0.9 lib/spree/api/controller_setup.rb
spree_api-3.1.0.rc3 lib/spree/api/controller_setup.rb
spree_api-3.1.0.rc2 lib/spree/api/controller_setup.rb
spree_api-3.1.0.rc1 lib/spree/api/controller_setup.rb
spree_api-3.0.8 lib/spree/api/controller_setup.rb
spree_api-3.0.7 lib/spree/api/controller_setup.rb
spree_api-3.0.6.1 lib/spree/api/controller_setup.rb
spree_api-3.0.6 lib/spree/api/controller_setup.rb
spree_api-3.0.5 lib/spree/api/controller_setup.rb
spree_api-3.0.4 lib/spree/api/controller_setup.rb
spree_api-2.4.10 lib/spree/api/controller_setup.rb
spree_api-2.3.13 lib/spree/api/controller_setup.rb
spree_api-2.2.14 lib/spree/api/controller_setup.rb
spree_api-3.0.3 lib/spree/api/controller_setup.rb
spree_api-2.4.9 lib/spree/api/controller_setup.rb
spree_api-2.3.12 lib/spree/api/controller_setup.rb
spree_api-2.2.13 lib/spree/api/controller_setup.rb
spree_api-3.0.2 lib/spree/api/controller_setup.rb
spree_api-2.4.8 lib/spree/api/controller_setup.rb