Sha256: 5e631bb2ba1a50b7ee44dda969972a7499168df92cf5154045212b3936c005f3

Contents?: true

Size: 794 Bytes

Versions: 22

Compression:

Stored size: 794 Bytes

Contents

module Spree
  module Api
    module ControllerSetup
      def self.included(klass)
        klass.class_eval do
          include AbstractController::Rendering
          include AbstractController::ViewPaths
          include AbstractController::Callbacks
          include AbstractController::Helpers

          include ActiveSupport::Rescuable

          include ActionController::Rendering
          include ActionController::ImplicitRender
          include ActionController::Rescue
          include ActionController::MimeResponds

          include CanCan::ControllerAdditions
          prepend_view_path Rails.root + "app/views"
          append_view_path File.expand_path("../../../app/views", File.dirname(__FILE__))

          respond_to :json
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
spree_api-1.2.5 lib/spree/api/controller_setup.rb
spree_api-1.1.6 lib/spree/api/controller_setup.rb
spree_api-1.1.5 lib/spree/api/controller_setup.rb
spree_api-1.2.4 lib/spree/api/controller_setup.rb
spree_api-1.3.2 lib/spree/api/controller_setup.rb
spree_api-1.2.3 lib/spree/api/controller_setup.rb
spree_api-1.3.1 lib/spree/api/controller_setup.rb
spree_api-1.3.0 lib/spree/api/controller_setup.rb
spree_api-1.3.0.rc2 lib/spree/api/controller_setup.rb
dup_spree_api-1.3.0.rc1 lib/spree/api/controller_setup.rb
spree_api-1.3.0.rc1 lib/spree/api/controller_setup.rb
spree_api-1.2.2 lib/spree/api/controller_setup.rb
spree_api-1.1.4 lib/spree/api/controller_setup.rb
spree_api_auth-0.2.0 lib/spree_api_auth/controller_setup.rb
spree_api-1.2.0 lib/spree/api/controller_setup.rb
spree_api_auth-0.1.1 lib/spree_api_auth/controller_setup.rb
spree_api_auth-0.1.0 lib/spree_api_auth/controller_setup.rb
spree_api_auth-0.0.3 lib/spree_api_auth/controller_setup.rb
spree_api_auth-0.0.2 lib/spree_api_auth/controller_setup.rb
spree_api-1.2.0.rc2 lib/spree/api/controller_setup.rb