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.2.9 lib/spree/api/controller_setup.rb
spree_api-3.1.14 lib/spree/api/controller_setup.rb
spree_api-3.3.6 lib/spree/api/controller_setup.rb
spree_api-3.2.8 lib/spree/api/controller_setup.rb
spree_api-3.1.13 lib/spree/api/controller_setup.rb
spree_api-3.3.5 lib/spree/api/controller_setup.rb
spree_api-3.3.4 lib/spree/api/controller_setup.rb
spree_api-3.2.7 lib/spree/api/controller_setup.rb
spree_api-3.1.12 lib/spree/api/controller_setup.rb
spree_api-3.3.3 lib/spree/api/controller_setup.rb
spree_api-3.2.6 lib/spree/api/controller_setup.rb
spree_api-3.1.11 lib/spree/api/controller_setup.rb
spree_api-3.1.10 lib/spree/api/controller_setup.rb
spree_api-3.3.2 lib/spree/api/controller_setup.rb
spree_api-3.2.5 lib/spree/api/controller_setup.rb
spree_api-3.1.9 lib/spree/api/controller_setup.rb
spree_api-3.3.1 lib/spree/api/controller_setup.rb
spree_api-3.2.4 lib/spree/api/controller_setup.rb
spree_api-3.1.8 lib/spree/api/controller_setup.rb
spree_api-3.3.0 lib/spree/api/controller_setup.rb