Sha256: a51dd8fdc00638b51e200d090a8f0a59904e550672181419f7ff921a9c33f892

Contents?: true

Size: 916 Bytes

Versions: 3

Compression:

Stored size: 916 Bytes

Contents

require "action_view"
require "datagrid/configuration"

module Datagrid

  extend ActiveSupport::Autoload

  autoload :Core
  autoload :ActiveModel
  autoload :Filters
  autoload :Columns
  autoload :Ordering
  autoload :Configuration

  autoload :Helper
  ActionView::Base.send(:include, Datagrid::Helper)
  
  autoload :FormBuilder
  ActionView::Helpers::FormBuilder.send(:include, Datagrid::FormBuilder)
  
  autoload :Renderer

  autoload :Engine

  def self.included(base)
    base.extend         ClassMethods
    base.class_eval do

      include ::Datagrid::Core
      include ::Datagrid::ActiveModel
      include ::Datagrid::Filters
      include ::Datagrid::Columns
      include ::Datagrid::Ordering

    end
  end # self.included

  module ClassMethods
  end # ClassMethods

  class ConfigurationError < StandardError; end
  class ArgumentError < ::ArgumentError; end

end

require "datagrid/scaffold"


Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
datagrid-0.8.4 lib/datagrid.rb
datagrid-0.8.3 lib/datagrid.rb
datagrid-0.8.2 lib/datagrid.rb