Module: ActiveRecordSchema

Defined in:
lib/active_record_schema.rb,
lib/active_record_schema/dsl.rb,
lib/active_record_schema/base.rb,
lib/active_record_schema/join.rb,
lib/active_record_schema/field.rb,
lib/active_record_schema/index.rb,
lib/active_record_schema/schema.rb,
lib/active_record_schema/railtie.rb,
lib/active_record_schema/schema_diff.rb

Defined Under Namespace

Modules: Base, Dsl, SchemaDiff Classes: Field, Index, Join, Railtie, Schema

Class Method Summary collapse

Class Method Details

.autoload_pathsObject



16
17
18
# File 'lib/active_record_schema.rb', line 16

def autoload_paths
  config.autoload_paths.map {|p| Dir.glob(p) }.flatten! 
end

.configObject



6
7
8
9
10
11
12
13
# File 'lib/active_record_schema.rb', line 6

def config
  @config ||= OpenStruct.new
  @config.autoload_paths ||= [
     Rails.root.join('app', 'models', '*.rb'),
     Rails.root.join('app', 'models', '**', '*.rb') 
  ]
  @config
end