2
# Copyright (c) 2004-2009 David Heinemeier Hansson
4
# Permission is hereby granted, free of charge, to any person obtaining
5
# a copy of this software and associated documentation files (the
6
# "Software"), to deal in the Software without restriction, including
7
# without limitation the rights to use, copy, modify, merge, publish,
8
# distribute, sublicense, and/or sell copies of the Software, and to
9
# permit persons to whom the Software is furnished to do so, subject to
10
# the following conditions:
12
# The above copyright notice and this permission notice shall be
13
# included in all copies or substantial portions of the Software.
15
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
require 'active_support'
27
activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib"
28
if File.directory?(activesupport_path)
29
$:.unshift activesupport_path
30
require 'active_support'
35
# TODO: Review explicit loads to see if they will automatically be handled by the initilizer.
37
[Base, DynamicFinderMatch, ConnectionAdapters::AbstractAdapter]
40
autoload :VERSION, 'active_record/version'
42
autoload :ActiveRecordError, 'active_record/base'
43
autoload :ConnectionNotEstablished, 'active_record/base'
45
autoload :Aggregations, 'active_record/aggregations'
46
autoload :AssociationPreload, 'active_record/association_preload'
47
autoload :Associations, 'active_record/associations'
48
autoload :AttributeMethods, 'active_record/attribute_methods'
49
autoload :AutosaveAssociation, 'active_record/autosave_association'
50
autoload :Base, 'active_record/base'
51
autoload :Batches, 'active_record/batches'
52
autoload :Calculations, 'active_record/calculations'
53
autoload :Callbacks, 'active_record/callbacks'
54
autoload :Dirty, 'active_record/dirty'
55
autoload :DynamicFinderMatch, 'active_record/dynamic_finder_match'
56
autoload :DynamicScopeMatch, 'active_record/dynamic_scope_match'
57
autoload :Migration, 'active_record/migration'
58
autoload :Migrator, 'active_record/migration'
59
autoload :NamedScope, 'active_record/named_scope'
60
autoload :NestedAttributes, 'active_record/nested_attributes'
61
autoload :Observing, 'active_record/observer'
62
autoload :QueryCache, 'active_record/query_cache'
63
autoload :Reflection, 'active_record/reflection'
64
autoload :Schema, 'active_record/schema'
65
autoload :SchemaDumper, 'active_record/schema_dumper'
66
autoload :Serialization, 'active_record/serialization'
67
autoload :SessionStore, 'active_record/session_store'
68
autoload :TestCase, 'active_record/test_case'
69
autoload :Timestamp, 'active_record/timestamp'
70
autoload :Transactions, 'active_record/transactions'
71
autoload :Validations, 'active_record/validations'
74
autoload :Optimistic, 'active_record/locking/optimistic'
75
autoload :Pessimistic, 'active_record/locking/pessimistic'
78
module ConnectionAdapters
79
autoload :AbstractAdapter, 'active_record/connection_adapters/abstract_adapter'
83
require 'active_record/i18n_interpolation_deprecation'
84
I18n.load_path << File.dirname(__FILE__) + '/active_record/locale/en.yml'