Sha256: 999d6f3800fc5e3943227dae5da61c27a341acaaa82e2a343276cc5758572b17

Contents?: true

Size: 630 Bytes

Versions: 9

Compression:

Stored size: 630 Bytes

Contents

module Resources
  module Controller
    extend ActiveSupport::Concern
          
      included do
      end

      module ClassMethods

        def resource_for name = nil, *args
          options = Resources::Config.to_hash.deep_merge(args.extract_options!)
          @resource_configuration = Resources::Configuration.new(options)
          @resource_configuration.resource_class_name = name
          include Resources::Actions
          include Resources::RestActions if @resource_configuration.rest_actions
        end

        def resource_configuration
          @resource_configuration
        end

      end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
resources-1.1.1 lib/resources/controller.rb
resources-1.1.0 lib/resources/controller.rb
resources-1.0.1 lib/resources/controller.rb
resources-1.0.0 lib/resources/controller.rb
resources-0.2.0 lib/resources/controller.rb
resources-0.1.3 lib/resources/controller.rb
resources-0.1.2 lib/resources/controller.rb
resources-0.1.1 lib/resources/controller.rb
resources-0.1.0 lib/resources/controller.rb