Sha256: 5e444c6e98b205c4fcf5c927be038f2749bc7ab39cce0d9d154deb48c8bdb07c

Contents?: true

Size: 560 Bytes

Versions: 24

Compression:

Stored size: 560 Bytes

Contents

require 'rails'
require 'ostruct'

module ActiveRecordSchema
  
  def config
    @config ||= OpenStruct.new
    @config.autoload_paths ||= [
       Rails.root.join('app', 'models', '*.rb'),
       Rails.root.join('app', 'models', '**', '*.rb') 
    ]
    @config
  end
  module_function :config
  
  def autoload_paths
    config.autoload_paths.map {|p| Dir.glob(p) }.flatten! 
  end
  module_function :autoload_paths

end

require 'active_record_schema/base'
require 'active_record_schema/railtie'

ActiveRecord::Base.send(:include, ActiveRecordSchema::Base)

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
active_record_schema-0.5.13 lib/active_record_schema.rb
active_record_schema-0.5.12 lib/active_record_schema.rb
active_record_schema-0.5.11 lib/active_record_schema.rb
active_record_schema-0.5.10 lib/active_record_schema.rb
active_record_schema-0.5.9 lib/active_record_schema.rb
active_record_schema-0.5.8 lib/active_record_schema.rb
active_record_schema-0.5.7 lib/active_record_schema.rb
active_record_schema-0.5.6 lib/active_record_schema.rb
active_record_schema-0.5.5 lib/active_record_schema.rb
active_record_schema-0.5.4 lib/active_record_schema.rb
active_record_schema-0.5.3 lib/active_record_schema.rb
active_record_schema-0.5.2 lib/active_record_schema.rb
active_record_schema-0.5.1 lib/active_record_schema.rb
active_record_schema-0.5.0 lib/active_record_schema.rb
active_record_schema-0.4.0 lib/active_record_schema.rb
active_record_schema-0.3.5 lib/active_record_schema.rb
active_record_schema-0.3.4 lib/active_record_schema.rb
active_record_schema-0.3.3 lib/active_record_schema.rb
active_record_schema-0.3.2 lib/active_record_schema.rb
active_record_schema-0.2.5 lib/active_record_schema.rb