activerecord 3.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of activerecord might be problematic. Click here for more details.

Files changed (93) hide show
  1. data/CHANGELOG +6023 -0
  2. data/README.rdoc +222 -0
  3. data/examples/associations.png +0 -0
  4. data/examples/performance.rb +162 -0
  5. data/examples/simple.rb +14 -0
  6. data/lib/active_record.rb +124 -0
  7. data/lib/active_record/aggregations.rb +277 -0
  8. data/lib/active_record/association_preload.rb +403 -0
  9. data/lib/active_record/associations.rb +2254 -0
  10. data/lib/active_record/associations/association_collection.rb +562 -0
  11. data/lib/active_record/associations/association_proxy.rb +295 -0
  12. data/lib/active_record/associations/belongs_to_association.rb +91 -0
  13. data/lib/active_record/associations/belongs_to_polymorphic_association.rb +78 -0
  14. data/lib/active_record/associations/has_and_belongs_to_many_association.rb +137 -0
  15. data/lib/active_record/associations/has_many_association.rb +128 -0
  16. data/lib/active_record/associations/has_many_through_association.rb +116 -0
  17. data/lib/active_record/associations/has_one_association.rb +143 -0
  18. data/lib/active_record/associations/has_one_through_association.rb +40 -0
  19. data/lib/active_record/associations/through_association_scope.rb +154 -0
  20. data/lib/active_record/attribute_methods.rb +60 -0
  21. data/lib/active_record/attribute_methods/before_type_cast.rb +33 -0
  22. data/lib/active_record/attribute_methods/dirty.rb +95 -0
  23. data/lib/active_record/attribute_methods/primary_key.rb +50 -0
  24. data/lib/active_record/attribute_methods/query.rb +39 -0
  25. data/lib/active_record/attribute_methods/read.rb +116 -0
  26. data/lib/active_record/attribute_methods/time_zone_conversion.rb +61 -0
  27. data/lib/active_record/attribute_methods/write.rb +37 -0
  28. data/lib/active_record/autosave_association.rb +369 -0
  29. data/lib/active_record/base.rb +1867 -0
  30. data/lib/active_record/callbacks.rb +288 -0
  31. data/lib/active_record/connection_adapters/abstract/connection_pool.rb +365 -0
  32. data/lib/active_record/connection_adapters/abstract/connection_specification.rb +113 -0
  33. data/lib/active_record/connection_adapters/abstract/database_limits.rb +57 -0
  34. data/lib/active_record/connection_adapters/abstract/database_statements.rb +329 -0
  35. data/lib/active_record/connection_adapters/abstract/query_cache.rb +81 -0
  36. data/lib/active_record/connection_adapters/abstract/quoting.rb +72 -0
  37. data/lib/active_record/connection_adapters/abstract/schema_definitions.rb +739 -0
  38. data/lib/active_record/connection_adapters/abstract/schema_statements.rb +543 -0
  39. data/lib/active_record/connection_adapters/abstract_adapter.rb +212 -0
  40. data/lib/active_record/connection_adapters/mysql_adapter.rb +643 -0
  41. data/lib/active_record/connection_adapters/postgresql_adapter.rb +1030 -0
  42. data/lib/active_record/connection_adapters/sqlite3_adapter.rb +53 -0
  43. data/lib/active_record/connection_adapters/sqlite_adapter.rb +401 -0
  44. data/lib/active_record/counter_cache.rb +115 -0
  45. data/lib/active_record/dynamic_finder_match.rb +53 -0
  46. data/lib/active_record/dynamic_scope_match.rb +32 -0
  47. data/lib/active_record/errors.rb +172 -0
  48. data/lib/active_record/fixtures.rb +1008 -0
  49. data/lib/active_record/locale/en.yml +40 -0
  50. data/lib/active_record/locking/optimistic.rb +172 -0
  51. data/lib/active_record/locking/pessimistic.rb +55 -0
  52. data/lib/active_record/log_subscriber.rb +48 -0
  53. data/lib/active_record/migration.rb +617 -0
  54. data/lib/active_record/named_scope.rb +138 -0
  55. data/lib/active_record/nested_attributes.rb +417 -0
  56. data/lib/active_record/observer.rb +140 -0
  57. data/lib/active_record/persistence.rb +291 -0
  58. data/lib/active_record/query_cache.rb +36 -0
  59. data/lib/active_record/railtie.rb +91 -0
  60. data/lib/active_record/railties/controller_runtime.rb +38 -0
  61. data/lib/active_record/railties/databases.rake +512 -0
  62. data/lib/active_record/reflection.rb +403 -0
  63. data/lib/active_record/relation.rb +393 -0
  64. data/lib/active_record/relation/batches.rb +89 -0
  65. data/lib/active_record/relation/calculations.rb +286 -0
  66. data/lib/active_record/relation/finder_methods.rb +355 -0
  67. data/lib/active_record/relation/predicate_builder.rb +41 -0
  68. data/lib/active_record/relation/query_methods.rb +261 -0
  69. data/lib/active_record/relation/spawn_methods.rb +112 -0
  70. data/lib/active_record/schema.rb +59 -0
  71. data/lib/active_record/schema_dumper.rb +195 -0
  72. data/lib/active_record/serialization.rb +60 -0
  73. data/lib/active_record/serializers/xml_serializer.rb +244 -0
  74. data/lib/active_record/session_store.rb +340 -0
  75. data/lib/active_record/test_case.rb +67 -0
  76. data/lib/active_record/timestamp.rb +88 -0
  77. data/lib/active_record/transactions.rb +356 -0
  78. data/lib/active_record/validations.rb +84 -0
  79. data/lib/active_record/validations/associated.rb +48 -0
  80. data/lib/active_record/validations/uniqueness.rb +185 -0
  81. data/lib/active_record/version.rb +9 -0
  82. data/lib/rails/generators/active_record.rb +27 -0
  83. data/lib/rails/generators/active_record/migration/migration_generator.rb +25 -0
  84. data/lib/rails/generators/active_record/migration/templates/migration.rb +17 -0
  85. data/lib/rails/generators/active_record/model/model_generator.rb +38 -0
  86. data/lib/rails/generators/active_record/model/templates/migration.rb +16 -0
  87. data/lib/rails/generators/active_record/model/templates/model.rb +5 -0
  88. data/lib/rails/generators/active_record/model/templates/module.rb +5 -0
  89. data/lib/rails/generators/active_record/observer/observer_generator.rb +15 -0
  90. data/lib/rails/generators/active_record/observer/templates/observer.rb +2 -0
  91. data/lib/rails/generators/active_record/session_migration/session_migration_generator.rb +24 -0
  92. data/lib/rails/generators/active_record/session_migration/templates/migration.rb +16 -0
  93. metadata +224 -0
@@ -0,0 +1,185 @@
1
+ require 'active_support/core_ext/array/wrap'
2
+
3
+ module ActiveRecord
4
+ module Validations
5
+ class UniquenessValidator < ActiveModel::EachValidator
6
+ def initialize(options)
7
+ super(options.reverse_merge(:case_sensitive => true))
8
+ end
9
+
10
+ # Unfortunately, we have to tie Uniqueness validators to a class.
11
+ def setup(klass)
12
+ @klass = klass
13
+ end
14
+
15
+ def validate_each(record, attribute, value)
16
+ finder_class = find_finder_class_for(record)
17
+ table = finder_class.unscoped
18
+
19
+ table_name = record.class.quoted_table_name
20
+ sql, params = mount_sql_and_params(finder_class, table_name, attribute, value)
21
+
22
+ relation = table.where(sql, *params)
23
+
24
+ Array.wrap(options[:scope]).each do |scope_item|
25
+ scope_value = record.send(scope_item)
26
+ relation = relation.where(scope_item => scope_value)
27
+ end
28
+
29
+ unless record.new_record?
30
+ # TODO : This should be in Arel
31
+ relation = relation.where("#{record.class.quoted_table_name}.#{record.class.primary_key} <> ?", record.send(:id))
32
+ end
33
+
34
+ if relation.exists?
35
+ record.errors.add(attribute, :taken, options.except(:case_sensitive, :scope).merge(:value => value))
36
+ end
37
+ end
38
+
39
+ protected
40
+
41
+ # The check for an existing value should be run from a class that
42
+ # isn't abstract. This means working down from the current class
43
+ # (self), to the first non-abstract class. Since classes don't know
44
+ # their subclasses, we have to build the hierarchy between self and
45
+ # the record's class.
46
+ def find_finder_class_for(record) #:nodoc:
47
+ class_hierarchy = [record.class]
48
+
49
+ while class_hierarchy.first != @klass
50
+ class_hierarchy.insert(0, class_hierarchy.first.superclass)
51
+ end
52
+
53
+ class_hierarchy.detect { |klass| !klass.abstract_class? }
54
+ end
55
+
56
+ def mount_sql_and_params(klass, table_name, attribute, value) #:nodoc:
57
+ column = klass.columns_hash[attribute.to_s]
58
+
59
+ operator = if value.nil?
60
+ "IS ?"
61
+ elsif column.text?
62
+ value = column.limit ? value.to_s.mb_chars[0, column.limit] : value.to_s
63
+ "#{klass.connection.case_sensitive_equality_operator} ?"
64
+ else
65
+ "= ?"
66
+ end
67
+
68
+ sql_attribute = "#{table_name}.#{klass.connection.quote_column_name(attribute)}"
69
+
70
+ if value.nil? || (options[:case_sensitive] || !column.text?)
71
+ sql = "#{sql_attribute} #{operator}"
72
+ else
73
+ sql = "LOWER(#{sql_attribute}) = LOWER(?)"
74
+ end
75
+
76
+ [sql, [value]]
77
+ end
78
+ end
79
+
80
+ module ClassMethods
81
+ # Validates whether the value of the specified attributes are unique across the system.
82
+ # Useful for making sure that only one user
83
+ # can be named "davidhh".
84
+ #
85
+ # class Person < ActiveRecord::Base
86
+ # validates_uniqueness_of :user_name, :scope => :account_id
87
+ # end
88
+ #
89
+ # It can also validate whether the value of the specified attributes are unique based on multiple
90
+ # scope parameters. For example, making sure that a teacher can only be on the schedule once
91
+ # per semester for a particular class.
92
+ #
93
+ # class TeacherSchedule < ActiveRecord::Base
94
+ # validates_uniqueness_of :teacher_id, :scope => [:semester_id, :class_id]
95
+ # end
96
+ #
97
+ # When the record is created, a check is performed to make sure that no record exists in the database
98
+ # with the given value for the specified attribute (that maps to a column). When the record is updated,
99
+ # the same check is made but disregarding the record itself.
100
+ #
101
+ # Configuration options:
102
+ # * <tt>:message</tt> - Specifies a custom error message (default is: "has already been taken").
103
+ # * <tt>:scope</tt> - One or more columns by which to limit the scope of the uniqueness constraint.
104
+ # * <tt>:case_sensitive</tt> - Looks for an exact match. Ignored by non-text columns (+true+ by default).
105
+ # * <tt>:allow_nil</tt> - If set to true, skips this validation if the attribute is +nil+ (default is +false+).
106
+ # * <tt>:allow_blank</tt> - If set to true, skips this validation if the attribute is blank (default is +false+).
107
+ # * <tt>:if</tt> - Specifies a method, proc or string to call to determine if the validation should
108
+ # occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>).
109
+ # The method, proc or string should return or evaluate to a true or false value.
110
+ # * <tt>:unless</tt> - Specifies a method, proc or string to call to determine if the validation should
111
+ # not occur (e.g. <tt>:unless => :skip_validation</tt>, or
112
+ # <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The method, proc or string should
113
+ # return or evaluate to a true or false value.
114
+ #
115
+ # === Concurrency and integrity
116
+ #
117
+ # Using this validation method in conjunction with ActiveRecord::Base#save
118
+ # does not guarantee the absence of duplicate record insertions, because
119
+ # uniqueness checks on the application level are inherently prone to race
120
+ # conditions. For example, suppose that two users try to post a Comment at
121
+ # the same time, and a Comment's title must be unique. At the database-level,
122
+ # the actions performed by these users could be interleaved in the following manner:
123
+ #
124
+ # User 1 | User 2
125
+ # ------------------------------------+--------------------------------------
126
+ # # User 1 checks whether there's |
127
+ # # already a comment with the title |
128
+ # # 'My Post'. This is not the case. |
129
+ # SELECT * FROM comments |
130
+ # WHERE title = 'My Post' |
131
+ # |
132
+ # | # User 2 does the same thing and also
133
+ # | # infers that his title is unique.
134
+ # | SELECT * FROM comments
135
+ # | WHERE title = 'My Post'
136
+ # |
137
+ # # User 1 inserts his comment. |
138
+ # INSERT INTO comments |
139
+ # (title, content) VALUES |
140
+ # ('My Post', 'hi!') |
141
+ # |
142
+ # | # User 2 does the same thing.
143
+ # | INSERT INTO comments
144
+ # | (title, content) VALUES
145
+ # | ('My Post', 'hello!')
146
+ # |
147
+ # | # ^^^^^^
148
+ # | # Boom! We now have a duplicate
149
+ # | # title!
150
+ #
151
+ # This could even happen if you use transactions with the 'serializable'
152
+ # isolation level. There are several ways to get around this problem:
153
+ #
154
+ # - By locking the database table before validating, and unlocking it after
155
+ # saving. However, table locking is very expensive, and thus not
156
+ # recommended.
157
+ # - By locking a lock file before validating, and unlocking it after saving.
158
+ # This does not work if you've scaled your Rails application across
159
+ # multiple web servers (because they cannot share lock files, or cannot
160
+ # do that efficiently), and thus not recommended.
161
+ # - Creating a unique index on the field, by using
162
+ # ActiveRecord::ConnectionAdapters::SchemaStatements#add_index. In the
163
+ # rare case that a race condition occurs, the database will guarantee
164
+ # the field's uniqueness.
165
+ #
166
+ # When the database catches such a duplicate insertion,
167
+ # ActiveRecord::Base#save will raise an ActiveRecord::StatementInvalid
168
+ # exception. You can either choose to let this error propagate (which
169
+ # will result in the default Rails exception page being shown), or you
170
+ # can catch it and restart the transaction (e.g. by telling the user
171
+ # that the title already exists, and asking him to re-enter the title).
172
+ # This technique is also known as optimistic concurrency control:
173
+ # http://en.wikipedia.org/wiki/Optimistic_concurrency_control
174
+ #
175
+ # Active Record currently provides no way to distinguish unique
176
+ # index constraint errors from other types of database errors, so you
177
+ # will have to parse the (database-specific) exception message to detect
178
+ # such a case.
179
+ #
180
+ def validates_uniqueness_of(*attr_names)
181
+ validates_with UniquenessValidator, _merge_attributes(attr_names)
182
+ end
183
+ end
184
+ end
185
+ end
@@ -0,0 +1,9 @@
1
+ module ActiveRecord
2
+ module VERSION #:nodoc:
3
+ MAJOR = 3
4
+ MINOR = 0
5
+ TINY = 0
6
+
7
+ STRING = [MAJOR, MINOR, TINY].join('.')
8
+ end
9
+ end
@@ -0,0 +1,27 @@
1
+ require 'rails/generators/named_base'
2
+ require 'rails/generators/migration'
3
+ require 'rails/generators/active_model'
4
+ require 'active_record'
5
+
6
+ module ActiveRecord
7
+ module Generators
8
+ class Base < Rails::Generators::NamedBase #:nodoc:
9
+ include Rails::Generators::Migration
10
+
11
+ # Set the current directory as base for the inherited generators.
12
+ def self.base_root
13
+ File.dirname(__FILE__)
14
+ end
15
+
16
+ # Implement the required interface for Rails::Generators::Migration.
17
+ def self.next_migration_number(dirname) #:nodoc:
18
+ next_migration_number = current_migration_number(dirname) + 1
19
+ if ActiveRecord::Base.timestamped_migrations
20
+ [Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % next_migration_number].max
21
+ else
22
+ "%.3d" % next_migration_number
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,25 @@
1
+ require 'rails/generators/active_record'
2
+
3
+ module ActiveRecord
4
+ module Generators
5
+ class MigrationGenerator < Base
6
+ argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
7
+
8
+ def create_migration_file
9
+ set_local_assigns!
10
+ migration_template "migration.rb", "db/migrate/#{file_name}.rb"
11
+ end
12
+
13
+ protected
14
+ attr_reader :migration_action
15
+
16
+ def set_local_assigns!
17
+ if file_name =~ /^(add|remove)_.*_(?:to|from)_(.*)/
18
+ @migration_action = $1
19
+ @table_name = $2.pluralize
20
+ end
21
+ end
22
+
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,17 @@
1
+ class <%= migration_class_name %> < ActiveRecord::Migration
2
+ def self.up
3
+ <% attributes.each do |attribute| -%>
4
+ <%- if migration_action -%>
5
+ <%= migration_action %>_column :<%= table_name %>, :<%= attribute.name %><% if migration_action == 'add' %>, :<%= attribute.type %><% end %>
6
+ <%- end -%>
7
+ <%- end -%>
8
+ end
9
+
10
+ def self.down
11
+ <% attributes.reverse.each do |attribute| -%>
12
+ <%- if migration_action -%>
13
+ <%= migration_action == 'add' ? 'remove' : 'add' %>_column :<%= table_name %>, :<%= attribute.name %><% if migration_action == 'remove' %>, :<%= attribute.type %><% end %>
14
+ <%- end -%>
15
+ <%- end -%>
16
+ end
17
+ end
@@ -0,0 +1,38 @@
1
+ require 'rails/generators/active_record'
2
+
3
+ module ActiveRecord
4
+ module Generators
5
+ class ModelGenerator < Base
6
+ argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
7
+
8
+ check_class_collision
9
+
10
+ class_option :migration, :type => :boolean
11
+ class_option :timestamps, :type => :boolean
12
+ class_option :parent, :type => :string, :desc => "The parent class for the generated model"
13
+
14
+ def create_migration_file
15
+ return unless options[:migration] && options[:parent].nil?
16
+ migration_template "migration.rb", "db/migrate/create_#{table_name}.rb"
17
+ end
18
+
19
+ def create_model_file
20
+ template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb")
21
+ end
22
+
23
+ def create_module_file
24
+ return if class_path.empty?
25
+ template 'module.rb', File.join('app/models', "#{class_path.join('/')}.rb") if behavior == :invoke
26
+ end
27
+
28
+ hook_for :test_framework
29
+
30
+ protected
31
+
32
+ def parent_class_name
33
+ options[:parent] || "ActiveRecord::Base"
34
+ end
35
+
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,16 @@
1
+ class <%= migration_class_name %> < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :<%= table_name %> do |t|
4
+ <% for attribute in attributes -%>
5
+ t.<%= attribute.type %> :<%= attribute.name %>
6
+ <% end -%>
7
+ <% if options[:timestamps] %>
8
+ t.timestamps
9
+ <% end -%>
10
+ end
11
+ end
12
+
13
+ def self.down
14
+ drop_table :<%= table_name %>
15
+ end
16
+ end
@@ -0,0 +1,5 @@
1
+ class <%= class_name %> < <%= parent_class_name.classify %>
2
+ <% attributes.select {|attr| attr.reference? }.each do |attribute| -%>
3
+ belongs_to :<%= attribute.name %>
4
+ <% end -%>
5
+ end
@@ -0,0 +1,5 @@
1
+ module <%= class_path.map(&:camelize).join('::') %>
2
+ def self.table_name_prefix
3
+ '<%= class_path.join('_') %>_'
4
+ end
5
+ end
@@ -0,0 +1,15 @@
1
+ require 'rails/generators/active_record'
2
+
3
+ module ActiveRecord
4
+ module Generators
5
+ class ObserverGenerator < Base
6
+ check_class_collision :suffix => "Observer"
7
+
8
+ def create_observer_file
9
+ template 'observer.rb', File.join('app/models', class_path, "#{file_name}_observer.rb")
10
+ end
11
+
12
+ hook_for :test_framework
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,2 @@
1
+ class <%= class_name %>Observer < ActiveRecord::Observer
2
+ end
@@ -0,0 +1,24 @@
1
+ require 'rails/generators/active_record'
2
+
3
+ module ActiveRecord
4
+ module Generators
5
+ class SessionMigrationGenerator < Base
6
+ argument :name, :type => :string, :default => "add_sessions_table"
7
+
8
+ def create_migration_file
9
+ migration_template "migration.rb", "db/migrate/#{file_name}.rb"
10
+ end
11
+
12
+ protected
13
+
14
+ def session_table_name
15
+ current_table_name = ActiveRecord::SessionStore::Session.table_name
16
+ if ["sessions", "session"].include?(current_table_name)
17
+ current_table_name = (ActiveRecord::Base.pluralize_table_names ? 'session'.pluralize : 'session')
18
+ end
19
+ current_table_name
20
+ end
21
+
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,16 @@
1
+ class <%= migration_class_name %> < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :<%= session_table_name %> do |t|
4
+ t.string :session_id, :null => false
5
+ t.text :data
6
+ t.timestamps
7
+ end
8
+
9
+ add_index :<%= session_table_name %>, :session_id
10
+ add_index :<%= session_table_name %>, :updated_at
11
+ end
12
+
13
+ def self.down
14
+ drop_table :<%= session_table_name %>
15
+ end
16
+ end
metadata ADDED
@@ -0,0 +1,224 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: activerecord
3
+ version: !ruby/object:Gem::Version
4
+ hash: 7
5
+ prerelease: false
6
+ segments:
7
+ - 3
8
+ - 0
9
+ - 0
10
+ version: 3.0.0
11
+ platform: ruby
12
+ authors:
13
+ - David Heinemeier Hansson
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-08-29 00:00:00 -05:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: activesupport
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - "="
28
+ - !ruby/object:Gem::Version
29
+ hash: 7
30
+ segments:
31
+ - 3
32
+ - 0
33
+ - 0
34
+ version: 3.0.0
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: activemodel
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - "="
44
+ - !ruby/object:Gem::Version
45
+ hash: 7
46
+ segments:
47
+ - 3
48
+ - 0
49
+ - 0
50
+ version: 3.0.0
51
+ type: :runtime
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: arel
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ hash: 23
62
+ segments:
63
+ - 1
64
+ - 0
65
+ - 0
66
+ version: 1.0.0
67
+ type: :runtime
68
+ version_requirements: *id003
69
+ - !ruby/object:Gem::Dependency
70
+ name: tzinfo
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ hash: 61
78
+ segments:
79
+ - 0
80
+ - 3
81
+ - 23
82
+ version: 0.3.23
83
+ type: :runtime
84
+ version_requirements: *id004
85
+ description: Databases on Rails. Build a persistent domain model by mapping database tables to Ruby classes. Strong conventions for associations, validations, aggregations, migrations, and testing come baked-in.
86
+ email: david@loudthinking.com
87
+ executables: []
88
+
89
+ extensions: []
90
+
91
+ extra_rdoc_files:
92
+ - README.rdoc
93
+ files:
94
+ - CHANGELOG
95
+ - README.rdoc
96
+ - examples/associations.png
97
+ - examples/performance.rb
98
+ - examples/simple.rb
99
+ - lib/active_record/aggregations.rb
100
+ - lib/active_record/association_preload.rb
101
+ - lib/active_record/associations/association_collection.rb
102
+ - lib/active_record/associations/association_proxy.rb
103
+ - lib/active_record/associations/belongs_to_association.rb
104
+ - lib/active_record/associations/belongs_to_polymorphic_association.rb
105
+ - lib/active_record/associations/has_and_belongs_to_many_association.rb
106
+ - lib/active_record/associations/has_many_association.rb
107
+ - lib/active_record/associations/has_many_through_association.rb
108
+ - lib/active_record/associations/has_one_association.rb
109
+ - lib/active_record/associations/has_one_through_association.rb
110
+ - lib/active_record/associations/through_association_scope.rb
111
+ - lib/active_record/associations.rb
112
+ - lib/active_record/attribute_methods/before_type_cast.rb
113
+ - lib/active_record/attribute_methods/dirty.rb
114
+ - lib/active_record/attribute_methods/primary_key.rb
115
+ - lib/active_record/attribute_methods/query.rb
116
+ - lib/active_record/attribute_methods/read.rb
117
+ - lib/active_record/attribute_methods/time_zone_conversion.rb
118
+ - lib/active_record/attribute_methods/write.rb
119
+ - lib/active_record/attribute_methods.rb
120
+ - lib/active_record/autosave_association.rb
121
+ - lib/active_record/base.rb
122
+ - lib/active_record/callbacks.rb
123
+ - lib/active_record/connection_adapters/abstract/connection_pool.rb
124
+ - lib/active_record/connection_adapters/abstract/connection_specification.rb
125
+ - lib/active_record/connection_adapters/abstract/database_limits.rb
126
+ - lib/active_record/connection_adapters/abstract/database_statements.rb
127
+ - lib/active_record/connection_adapters/abstract/query_cache.rb
128
+ - lib/active_record/connection_adapters/abstract/quoting.rb
129
+ - lib/active_record/connection_adapters/abstract/schema_definitions.rb
130
+ - lib/active_record/connection_adapters/abstract/schema_statements.rb
131
+ - lib/active_record/connection_adapters/abstract_adapter.rb
132
+ - lib/active_record/connection_adapters/mysql_adapter.rb
133
+ - lib/active_record/connection_adapters/postgresql_adapter.rb
134
+ - lib/active_record/connection_adapters/sqlite3_adapter.rb
135
+ - lib/active_record/connection_adapters/sqlite_adapter.rb
136
+ - lib/active_record/counter_cache.rb
137
+ - lib/active_record/dynamic_finder_match.rb
138
+ - lib/active_record/dynamic_scope_match.rb
139
+ - lib/active_record/errors.rb
140
+ - lib/active_record/fixtures.rb
141
+ - lib/active_record/locale/en.yml
142
+ - lib/active_record/locking/optimistic.rb
143
+ - lib/active_record/locking/pessimistic.rb
144
+ - lib/active_record/log_subscriber.rb
145
+ - lib/active_record/migration.rb
146
+ - lib/active_record/named_scope.rb
147
+ - lib/active_record/nested_attributes.rb
148
+ - lib/active_record/observer.rb
149
+ - lib/active_record/persistence.rb
150
+ - lib/active_record/query_cache.rb
151
+ - lib/active_record/railtie.rb
152
+ - lib/active_record/railties/controller_runtime.rb
153
+ - lib/active_record/railties/databases.rake
154
+ - lib/active_record/reflection.rb
155
+ - lib/active_record/relation/batches.rb
156
+ - lib/active_record/relation/calculations.rb
157
+ - lib/active_record/relation/finder_methods.rb
158
+ - lib/active_record/relation/predicate_builder.rb
159
+ - lib/active_record/relation/query_methods.rb
160
+ - lib/active_record/relation/spawn_methods.rb
161
+ - lib/active_record/relation.rb
162
+ - lib/active_record/schema.rb
163
+ - lib/active_record/schema_dumper.rb
164
+ - lib/active_record/serialization.rb
165
+ - lib/active_record/serializers/xml_serializer.rb
166
+ - lib/active_record/session_store.rb
167
+ - lib/active_record/test_case.rb
168
+ - lib/active_record/timestamp.rb
169
+ - lib/active_record/transactions.rb
170
+ - lib/active_record/validations/associated.rb
171
+ - lib/active_record/validations/uniqueness.rb
172
+ - lib/active_record/validations.rb
173
+ - lib/active_record/version.rb
174
+ - lib/active_record.rb
175
+ - lib/rails/generators/active_record/migration/migration_generator.rb
176
+ - lib/rails/generators/active_record/migration/templates/migration.rb
177
+ - lib/rails/generators/active_record/model/model_generator.rb
178
+ - lib/rails/generators/active_record/model/templates/migration.rb
179
+ - lib/rails/generators/active_record/model/templates/model.rb
180
+ - lib/rails/generators/active_record/model/templates/module.rb
181
+ - lib/rails/generators/active_record/observer/observer_generator.rb
182
+ - lib/rails/generators/active_record/observer/templates/observer.rb
183
+ - lib/rails/generators/active_record/session_migration/session_migration_generator.rb
184
+ - lib/rails/generators/active_record/session_migration/templates/migration.rb
185
+ - lib/rails/generators/active_record.rb
186
+ has_rdoc: true
187
+ homepage: http://www.rubyonrails.org
188
+ licenses: []
189
+
190
+ post_install_message:
191
+ rdoc_options:
192
+ - --main
193
+ - README.rdoc
194
+ require_paths:
195
+ - lib
196
+ required_ruby_version: !ruby/object:Gem::Requirement
197
+ none: false
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ hash: 57
202
+ segments:
203
+ - 1
204
+ - 8
205
+ - 7
206
+ version: 1.8.7
207
+ required_rubygems_version: !ruby/object:Gem::Requirement
208
+ none: false
209
+ requirements:
210
+ - - ">="
211
+ - !ruby/object:Gem::Version
212
+ hash: 3
213
+ segments:
214
+ - 0
215
+ version: "0"
216
+ requirements: []
217
+
218
+ rubyforge_project: activerecord
219
+ rubygems_version: 1.3.7
220
+ signing_key:
221
+ specification_version: 3
222
+ summary: Object-relational mapper framework (part of Rails).
223
+ test_files: []
224
+