Sha256: d3da99cae008242d9efe9be3a6dc12a0fef91b3b0da63a4b214f5a0218541564

Contents?: true

Size: 1.07 KB

Versions: 5

Compression:

Stored size: 1.07 KB

Contents

require 'hashie/dash'
require 'hashie/mash'
require 'trax_core'
require 'inherited_resources'
require 'will_paginate'
require 'active_model_serializers'
require 'has_scope'

module Trax
  module Controller
    extend ::ActiveSupport::Concern
    extend ::ActiveSupport::Autoload

    included do
      inherit_resources
    end

    autoload :Actions
    autoload :Authorize
    autoload :Authorization
    autoload :Config
    autoload :Collection
    autoload :Engine
    autoload :Resource
    autoload :InheritResources
    autoload :ActionTypes
    autoload :Serialization

    @configuration ||= ::Trax::Controller::Config.new

    def self.configure(&block)
      block.call(config)
    end

    include ::Trax::Controller::InheritResources
    include ::Trax::Controller::Collection::Base
    include ::Trax::Controller::Resource::Base
    include ::Trax::Controller::Actions
    include ::Trax::Controller::ActionTypes

    class << self
      attr_accessor :configuration
      alias_method :config, :configuration
    end
  end
end

::Trax::Controller::Engine if defined?(::Rails)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
trax_controller-0.1.3 lib/trax/controller.rb
trax_controller-0.1.2 lib/trax/controller.rb
trax_controller-0.1.1 lib/trax/controller.rb
trax_controller-0.1.0 lib/trax/controller.rb
trax_controller-0.0.4 lib/trax/controller.rb