Sha256: ecdffbac1a09a12faa825c664747fa65578fb32fdffc4e36383ff9704a177afe

Contents?: true

Size: 657 Bytes

Versions: 1

Compression:

Stored size: 657 Bytes

Contents

module Voluntary
  module Api
    module V1
      class BaseController < ActionController::Base #ActionController::Metal
        #include ActionController::Rendering        # enables rendering
        #include ActionController::MimeResponds     # enables serving different content types like :xml or :json
        #include AbstractController::Callbacks      # callbacks for your authentication logic
        
        after_filter :set_access_control_headers
        
        def set_access_control_headers
          headers['Access-Control-Allow-Origin'] = '*'
          headers['Access-Control-Request-Method'] = '*'
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
voluntary-0.2.4 app/controllers/voluntary/api/v1/base_controller.rb