Skip to content
Newer
Older
100644 448 lines (279 sloc) 13.3 KB
0fb6bbd @rafaelfranca Merge pull request #7140 from seamusabshere/patch-1
rafaelfranca authored Aug 5, 2012
1 ## Rails 3.2.9 (unreleased)
6abe0e7 @rafaelfranca Backport explain fixes.
rafaelfranca authored Sep 16, 2012
2
990a938 @ernie Fix has_many assocation w/select load after create
ernie authored Oct 5, 2012
3 * Fix deprecation notice when loading a collection association that
4 selects columns from other tables, if a new record was previously
5 built using that association.
6
7 *Ernie Miller*
8
de360ac @rafaelfranca Merge pull request #7850 from senny/5920_postgres_adapter_table_with_…
rafaelfranca authored Oct 5, 2012
9 * The postgres adapter now supports tables with capital letters.
10 Fix #5920
11
12 *Yves Senn*
13
14 * `CollectionAssociation#count` returns `0` without querying if the
15 parent record is not persisted.
9896729 @rafaelfranca Merge pull request #6978 from frodsan/count_nosql_unsaved_parent
rafaelfranca authored Oct 3, 2012
16
17 Before:
18
de360ac @rafaelfranca Merge pull request #7850 from senny/5920_postgres_adapter_table_with_…
rafaelfranca authored Oct 6, 2012
19 person.pets.count
9896729 @rafaelfranca Merge pull request #6978 from frodsan/count_nosql_unsaved_parent
rafaelfranca authored Oct 4, 2012
20 # SELECT COUNT(*) FROM "pets" WHERE "pets"."person_id" IS NULL
21 # => 0
22
23 After:
24
de360ac @rafaelfranca Merge pull request #7850 from senny/5920_postgres_adapter_table_with_…
rafaelfranca authored Oct 6, 2012
25 person.pets.count
9896729 @rafaelfranca Merge pull request #6978 from frodsan/count_nosql_unsaved_parent
rafaelfranca authored Oct 4, 2012
26 # fires without sql query
27 # => 0
28
29 *Francesco Rodriguez*
30
3f0bc97 @rafaelfranca Merge pull request #7822 from lulalala/reset-counter-cache-for-has-ma…
rafaelfranca authored Oct 2, 2012
31 * Fix `reset_counters` crashing on `has_many :through` associations.
32 Fix #7822.
33
34 *lulalala*
35
3908706 @jrochkind ConnectionPool accepts spec key 'checkout_timeout'
jrochkind authored Sep 21, 2012
36 * ConnectionPool recognizes checkout_timeout spec key as taking
37 precedence over legacy wait_timeout spec key, can be used to avoid
38 conflict with mysql2 use of wait_timeout. Closes #7684.
39
40 *jrochkind*
41
b8fba55 @tenderlove Merge pull request #3544 from amatsuda/_field_changed
tenderlove authored Feb 14, 2012
42 * Rename field_changed? to _field_changed? so that users can create a field named field
43
44 *Akira Matsuda*, backported by *Steve Klabnik*
45
ee43989 @rafaelfranca Merge pull request #7661 from ernie/build-join-records-on-unsaved-hmt
rafaelfranca authored Sep 17, 2012
46 * Fix creation of through association models when using `collection=[]`
47 on a `has_many :through` association from an unsaved model.
48 Fix #7661.
49
50 *Ernie Miller*
51
6abe0e7 @rafaelfranca Backport explain fixes.
rafaelfranca authored Sep 17, 2012
52 * Explain only normal CRUD sql (select / update / insert / delete).
53 Fix problem that explains unexplainable sql. Closes #7544 #6458.
54
55 *kennyj*
56
f48bb01 Backport PostgreSQL auto-reconnect test coverage
Steve Jorgensen authored Jun 6, 2012
57 * Backport test coverage to ensure that PostgreSQL auto-reconnect functionality
58 remains healthy.
59
2326d46 fix markdown markup in AR/CHANGELOG
Francesco Rodríguez authored Sep 13, 2012
60 *Steve Jorgensen*
f48bb01 Backport PostgreSQL auto-reconnect test coverage
Steve Jorgensen authored Jun 7, 2012
61
9630485 @kennyj Backported #7572 to 3-2-stable. Use config['encoding'], because datab…
kennyj authored Sep 12, 2012
62 * Use config['encoding'] instead of config['charset'] when executing
63 databases.rake in the mysql/mysql2. A correct option for a database.yml
64 is 'encoding'.
65
66 *kennyj*
67
652107e @thiagopradi ConnectionAdapters::Column.type_cast_code should always convert value…
thiagopradi authored Sep 2, 2012
68 * Fix ConnectionAdapters::Column.type_cast_code integer conversion,
69 to always convert values to integer calling #to_i. Fixes #7509.
70
71 *Thiago Pradi*
0fb6bbd @rafaelfranca Merge pull request #7140 from seamusabshere/patch-1
rafaelfranca authored Aug 5, 2012
72
5054e26 @rafaelfranca Merge pull request #7337 from adzap/string_to_dummy_time
rafaelfranca authored Sep 5, 2012
73 * Fix time column type casting for invalid time string values to correctly return nil.
74
75 *Adam Meehan*
76
01d09a6 @senny set the configured #inheritance_column on #become (#7503)
senny authored Sep 2, 2012
77 * Fix `becomes` when using a configured `inheritance_column`.
78
79 *Yves Senn*
80
648c5a1 @rafaelfranca Merge pull request #5210 from Pliny/masteri
rafaelfranca authored Aug 21, 2012
81 * Fix `reset_counters` when there are multiple `belongs_to` association with the
82 same foreign key and one of them have a counter cache.
83 Fixes #5200.
84
85 *Dave Desrochers*
86
8905c1f @rafaelfranca Merge pull request #6986 from kennyj/fix_6975
rafaelfranca authored Aug 21, 2012
87 * Round usec when comparing timestamp attributes in the dirty tracking.
88 Fixes #6975.
89
90 *kennyj*
91
fdf4eae @carlosantoniodasilva Merge pull request #7377 from brainopia/use_inversed_parent_for_first…
carlosantoniodasilva authored Aug 18, 2012
92 * Use inversed parent for first and last child of has_many association.
93
94 *Ravil Bayramgalin*
95
d6dbd7f @rafaelfranca Merge pull request #7352 from aripollak/microsecond-timestamp
rafaelfranca authored Aug 17, 2012
96 * Fix Column.microseconds and Column.fast_string_to_date to avoid converting
97 timestamp seconds to a float, since it occasionally results in inaccuracies
98 with microsecond-precision times. Fixes #7352.
99
100 *Ari Pollak*
101
8055cd6 @rafaelfranca Do not use update_column where update_attribute is not interchangeable
rafaelfranca authored Aug 15, 2012
102 * Fix `increment!`, `decrement!`, `toggle!` that was skipping callbacks.
103 Fixes #7306.
104
105 *Rafael Mendonça França*
106
786713a @rafaelfranca Merge pull request #6073 from daveyeu/restore-state-on-record-invalid
rafaelfranca authored Aug 11, 2012
107 * Fix AR#create to return an unsaved record when AR::RecordInvalid is
108 raised. Fixes #3217.
109
110 *Dave Yeu*
111
3307a2e @rafaelfranca Add CHANGELOG entry for #7286
rafaelfranca authored Aug 10, 2012
112 * Remove unnecessary transaction when assigning has_one associations with a nil or equal value.
113 Fix #7191.
114
115 *kennyj*
116
5c2fc69 @rafaelfranca Add CHANGELOG entry
rafaelfranca authored Aug 9, 2012
117 * Allow store to work with an empty column.
118 Fix #4840.
119
120 *Jeremy Walker*
121
ea48732 @rafaelfranca Add CHANGELOG entry for a935c7a
rafaelfranca authored Aug 6, 2012
122 * Remove prepared statement from system query in postgresql adapter.
123 Fix #5872.
124
125 *Ivan Evtuhovich*
126
0fb6bbd @rafaelfranca Merge pull request #7140 from seamusabshere/patch-1
rafaelfranca authored Aug 5, 2012
127 * Make sure `:environment` task is executed before `db:schema:load` or `db:structure:load`
128 Fixes #4772.
129
130 *Seamus Abshere*
131
132
ddedf5d @spastorino Add release date to CHANGELOGs
spastorino authored Aug 9, 2012
133 ## Rails 3.2.8 (Aug 9, 2012) ##
a893672 @rafaelfranca Add CHANGELOG entry [ci skip]
rafaelfranca authored Jul 31, 2012
134
55e05d4 @rafaelfranca Do not consider the numeric attribute as changed if the old value is
rafaelfranca authored Aug 2, 2012
135 * Do not consider the numeric attribute as changed if the old value is zero and the new value
136 is not a string.
137 Fixes #7237.
138
139 *Rafael Mendonça França*
a893672 @rafaelfranca Add CHANGELOG entry [ci skip]
rafaelfranca authored Jul 31, 2012
140
81542f9 @fxn removes the deprecation of update_attribute
fxn authored Aug 1, 2012
141 * Removes the deprecation of `update_attribute`. *fxn*
142
857697b @rafaelfranca Fix CHANGELOGS
rafaelfranca authored Aug 1, 2012
143 * Reverted the deprecation of `composed_of`. *Rafael Mendonça França*
144
0c52702 @jonleighton Revert "Deprecate :finder_sql, :counter_sql, :insert_sql, :delete_sql."
jonleighton authored Aug 1, 2012
145 * Reverted the deprecation of `*_sql` association options. They will
857697b @rafaelfranca Fix CHANGELOGS
rafaelfranca authored Aug 1, 2012
146 be deprecated in 4.0 instead. *Jon Leighton*
147
148 * Do not eager load AR session store. ActiveRecord::SessionStore depends on the abstract store
149 in Action Pack. Eager loading this class would break client code that eager loads Active Record
150 standalone.
151 Fixes #7160
0c52702 @jonleighton Revert "Deprecate :finder_sql, :counter_sql, :insert_sql, :delete_sql."
jonleighton authored Aug 1, 2012
152
857697b @rafaelfranca Fix CHANGELOGS
rafaelfranca authored Aug 1, 2012
153 *Xavier Noria*
6764b7b @spastorino Add missing CHANGELOG entries
spastorino authored Aug 1, 2012
154
a893672 @rafaelfranca Add CHANGELOG entry [ci skip]
rafaelfranca authored Jul 31, 2012
155 * Do not set RAILS_ENV to "development" when using `db:test:prepare` and related rake tasks.
156 This was causing the truncation of the development database data when using RSpec.
857697b @rafaelfranca Fix CHANGELOGS
rafaelfranca authored Aug 1, 2012
157 Fixes #7175.
a893672 @rafaelfranca Add CHANGELOG entry [ci skip]
rafaelfranca authored Jul 31, 2012
158
159 *Rafael Mendonça França*
160
d1b9cf2 @tenderlove updating release date
tenderlove authored Jul 26, 2012
161 ## Rails 3.2.7 (Jul 26, 2012) ##
2109fd5 @fxn registers the deprecation of update_attribute in the CHANGELOG
fxn authored Jun 14, 2012
162
a79bfa9 @jonleighton Deprecate :finder_sql, :counter_sql, :insert_sql, :delete_sql.
jonleighton authored Jul 20, 2012
163 * `:finder_sql` and `:counter_sql` options on collection associations
164 are deprecated. Please transition to using scopes.
165
166 *Jon Leighton*
167
168 * `:insert_sql` and `:delete_sql` options on `has_and_belongs_to_many`
169 associations are deprecated. Please transition to using `has_many
170 :through`
171
172 *Jon Leighton*
173
857697b @rafaelfranca Fix CHANGELOGS
rafaelfranca authored Aug 1, 2012
174 * `composed_of` has been deprecated. You'll have to write your own accessor
175 and mutator methods if you'd like to use value objects to represent some
176 portion of your models.
177
178 *Steve Klabnik*
179
2f930df @rafaelfranca Revert "Add update_columns and the suggestion of using update_columns
rafaelfranca authored Jul 30, 2012
180 * `update_attribute` has been deprecated. Use `update_column` if
2109fd5 @fxn registers the deprecation of update_attribute in the CHANGELOG
fxn authored Jun 14, 2012
181 you want to bypass mass-assignment protection, validations, callbacks,
182 and touching of updated_at. Otherwise please use `update_attributes`.
183
184 *Steve Klabnik*
185
8381d39 @tenderlove updating changelogs
tenderlove authored Jun 12, 2012
186 ## Rails 3.2.6 (Jun 12, 2012) ##
959fb8e @jonleighton Revert "Perf: Don't load the association for #delete_all."
jonleighton authored Jun 7, 2012
187
ceb8ec3 @tenderlove updating changelogs with security fixes
tenderlove authored Jun 11, 2012
188 * protect against the nesting of hashes changing the
189 table context in the next call to build_from_hash. This fix
190 covers this case as well.
191
8381d39 @tenderlove updating changelogs
tenderlove authored Jun 12, 2012
192 CVE-2012-2695
193
959fb8e @jonleighton Revert "Perf: Don't load the association for #delete_all."
jonleighton authored Jun 7, 2012
194 * Revert earlier 'perf fix' (see 3.2.4 changelog / GH #6289). This
195 change introduced a regression (GH #6609). assoc.clear and
196 assoc.delete_all have loaded the association before doing the delete
197 since at least Rails 2.3. Doing the delete without loading the
198 records means that the `before_remove` and `after_remove` callbacks do
199 not get invoked. Therefore, this change was less a fix a more an
200 optimisation, which should only have gone into master.
201
202 *Jon Leighton*
203
b13d89e @rafaelfranca Add release date of 3.2.5 on the CHANGELOG
rafaelfranca authored Jun 1, 2012
204 ## Rails 3.2.5 (Jun 1, 2012) ##
205
206 * Restore behavior of Active Record 3.2.3 scopes.
207 A series of commits relating to preloading and scopes caused a regression.
208
209 *Andrew White*
210
211
d3e5d1c @tenderlove updating changelogs
tenderlove authored May 31, 2012
212 ## Rails 3.2.4 (May 31, 2012) ##
2c21a2f @benedikt Revert "Revert "Fix #5667. Preloading should ignore scoping.""
benedikt authored Apr 19, 2012
213
b98d1e2 @jonleighton Perf: Don't load the association for #delete_all.
jonleighton authored May 18, 2012
214 * Perf fix: Don't load the records when doing assoc.delete_all.
215 GH #6289. *Jon Leighton*
216
2c21a2f @benedikt Revert "Revert "Fix #5667. Preloading should ignore scoping.""
benedikt authored Apr 19, 2012
217 * Association preloading shouldn't be affected by the current scoping.
218 This could cause infinite recursion and potentially other problems.
219 See GH #5667. *Jon Leighton*
220
d3e5d1c @tenderlove updating changelogs
tenderlove authored May 31, 2012
221 * Datetime attributes are forced to be changed. GH #3965
222
223 * Fix attribute casting. GH #5549
224
225 * Fix #5667. Preloading should ignore scoping.
226
44aca7b @tenderlove adding security notifications to CHANGELOGs
tenderlove authored May 31, 2012
227 * Predicate builder should not recurse for determining where columns.
228 Thanks to Ben Murphy for reporting this! CVE-2012-2661
229
b13d89e @rafaelfranca Add release date of 3.2.5 on the CHANGELOG
rafaelfranca authored Jun 1, 2012
230
3005f58 @rafaelfranca Add release data to Rails 3.2.3
rafaelfranca authored Apr 21, 2012
231 ## Rails 3.2.3 (March 30, 2012) ##
3bfd651 @vijaydev changelog updates [ci skip]
vijaydev authored Mar 9, 2012
232
90d9635 @pixeltrix Add dynamic find_or_create_by_{attribute}! method.
pixeltrix authored Mar 12, 2012
233 * Added find_or_create_by_{attribute}! dynamic method. *Andrew White*
234
3bfd651 @vijaydev changelog updates [ci skip]
vijaydev authored Mar 8, 2012
235 * Whitelist all attribute assignment by default. Change the default for newly generated applications to whitelist all attribute assignment. Also update the generated model classes so users are reminded of the importance of attr_accessible. *NZKoz*
236
237 * Update ActiveRecord::AttributeMethods#attribute_present? to return false for empty strings. *Jacobkg*
238
239 * Fix associations when using per class databases. *larskanis*
240
241 * Revert setting NOT NULL constraints in add_timestamps *fxn*
242
243 * Fix mysql to use proper text types. Fixes #3931. *kennyj*
244
245 * Fix #5069 - Protect foreign key from mass assignment through association builder. *byroot*
246
db743ff @rafaelfranca Fix my name in the CHANGELOG to follow the convention
rafaelfranca authored Mar 9, 2012
247
248 ## Rails 3.2.2 (March 1, 2012) ##
249
250 * No changes.
251
252
97e8d1d @fxn CHANGELOG revision for v3.2.1
fxn authored Jan 26, 2012
253 ## Rails 3.2.1 (January 26, 2012) ##
fab664a @jonleighton Fix another race condition.
jonleighton authored Jan 20, 2012
254
2809375 @fxn registers 2483460 in the CHANGELOG
fxn authored Jan 26, 2012
255 * The threshold for auto EXPLAIN is ignored if there's no logger. *fxn*
256
97e8d1d @fxn CHANGELOG revision for v3.2.1
fxn authored Jan 26, 2012
257 * Call `to_s` on the value passed to `table_name=`, in particular symbols
258 are supported (regression). *Sergey Nartimov*
259
fab664a @jonleighton Fix another race condition.
jonleighton authored Jan 20, 2012
260 * Fix possible race condition when two threads try to define attribute
97e8d1d @fxn CHANGELOG revision for v3.2.1
fxn authored Jan 26, 2012
261 methods for the same class. *Jon Leighton*
262
fab664a @jonleighton Fix another race condition.
jonleighton authored Jan 20, 2012
263
f36dcaf @dhh Preparing for 3.2.0 release
dhh authored Jan 20, 2012
264 ## Rails 3.2.0 (January 20, 2012) ##
281272a @jonleighton Convert CHANGELOGs to Markdown format.
jonleighton authored Nov 4, 2011
265
4c5b73f @tenderlove Merge pull request #4531 from exviva/pessimistic_with_lock
tenderlove authored Jan 19, 2012
266 * Added a `with_lock` method to ActiveRecord objects, which starts
267 a transaction, locks the object (pessimistically) and yields to the block.
268 The method takes one (optional) parameter and passes it to `lock!`.
269
270 Before:
271
272 class Order < ActiveRecord::Base
273 def cancel!
274 transaction do
275 lock!
276 # ... cancelling logic
277 end
278 end
279 end
280
281 After:
282
283 class Order < ActiveRecord::Base
284 def cancel!
285 with_lock do
286 # ... cancelling logic
287 end
288 end
289 end
290
291 *Olek Janiszewski*
292
3f16f5b @spastorino Add CHANGELOG entry
spastorino authored Jan 11, 2012
293 * 'on' and 'ON' boolean columns values are type casted to true
294 *Santiago Pastorino*
295
35a1744 @drogus Allow to run migrations with given scope, with SCOPE=<scope>
drogus authored Dec 9, 2011
296 * Added ability to run migrations only for given scope, which allows
297 to run migrations only from one engine (for example to revert changes
298 from engine that you want to remove).
299
300 Example:
301 rake db:migrate SCOPE=blog
302
4c5b73f @tenderlove Merge pull request #4531 from exviva/pessimistic_with_lock
tenderlove authored Jan 19, 2012
303 *Piotr Sarnacki*
35a1744 @drogus Allow to run migrations with given scope, with SCOPE=<scope>
drogus authored Dec 9, 2011
304
305 * Migrations copied from engines are now scoped with engine's name,
306 for example 01_create_posts.blog.rb. *Piotr Sarnacki*
307
de24ed9 @fxn removes the convenience instance version of AR::Base.silence_auto_exp…
fxn authored Dec 3, 2011
308 * Implements `AR::Base.silence_auto_explain`. This method allows the user to
309 selectively disable automatic EXPLAINs within a block. *fxn*
0be5ada @fxn implements AR::Base(.|#)silence_auto_explain
fxn authored Dec 2, 2011
310
0306f82 @fxn implements automatic EXPLAIN logging for slow queries
fxn authored Dec 2, 2011
311 * Implements automatic EXPLAIN logging for slow queries.
312
313 A new configuration parameter `config.active_record.auto_explain_threshold_in_seconds`
314 determines what's to be considered a slow query. Setting that to `nil` disables
315 this feature. Defaults are 0.5 in development mode, and `nil` in test and production
316 modes.
317
318 As of this writing there's support for SQLite, MySQL (mysql2 adapter), and
319 PostgreSQL.
320
321 *fxn*
a382d60 @bogdan ActiveRecord::Relation#pluck method
bogdan authored Nov 30, 2011
322
323 * Implemented ActiveRecord::Relation#pluck method
324
325 Method returns Array of column value from table under ActiveRecord model
2809375 @fxn registers 2483460 in the CHANGELOG
fxn authored Jan 26, 2012
326
a382d60 @bogdan ActiveRecord::Relation#pluck method
bogdan authored Nov 30, 2011
327 Client.pluck(:id)
328
329 *Bogdan Gusiev*
330
0e2477b @tenderlove Automatic closure of connections in threads is deprecated. For example
tenderlove authored Nov 29, 2011
331 * Automatic closure of connections in threads is deprecated. For example
332 the following code is deprecated:
333
334 Thread.new { Post.find(1) }.join
335
336 It should be changed to close the database connection at the end of
337 the thread:
338
339 Thread.new {
340 Post.find(1)
341 Post.connection.close
342 }.join
2809375 @fxn registers 2483460 in the CHANGELOG
fxn authored Jan 26, 2012
343
0e2477b @tenderlove Automatic closure of connections in threads is deprecated. For example
tenderlove authored Nov 29, 2011
344 Only people who spawn threads in their application code need to worry
345 about this change.
346
34609d6 @jonleighton Deprecate set_inheritance_column in favour of self.inheritance_column=
jonleighton authored Nov 29, 2011
347 * Deprecated:
348
349 * `set_table_name`
350 * `set_inheritance_column`
7af719e @jonleighton Deprecate set_sequence_name in favour of self.sequence_name=
jonleighton authored Nov 29, 2011
351 * `set_sequence_name`
1a474cc @jonleighton Deprecate set_primary_key in favour of self.primary_key=
jonleighton authored Nov 29, 2011
352 * `set_primary_key`
f3c84dc @jonleighton Deprecate set_locking_column in favour of self.locking_column=
jonleighton authored Nov 29, 2011
353 * `set_locking_column`
34609d6 @jonleighton Deprecate set_inheritance_column in favour of self.inheritance_column=
jonleighton authored Nov 29, 2011
354
355 Use an assignment method instead. For example, instead of `set_table_name`, use `self.table_name=`:
0b72a04 @jonleighton Deprecate set_table_name in favour of self.table_name= or defining yo…
jonleighton authored Nov 29, 2011
356
357 class Project < ActiveRecord::Base
358 self.table_name = "project"
359 end
360
34609d6 @jonleighton Deprecate set_inheritance_column in favour of self.inheritance_column=
jonleighton authored Nov 29, 2011
361 Or define your own `self.table_name` method:
362
0b72a04 @jonleighton Deprecate set_table_name in favour of self.table_name= or defining yo…
jonleighton authored Nov 29, 2011
363 class Post < ActiveRecord::Base
364 def self.table_name
365 "special_" + super
366 end
367 end
368 Post.table_name # => "special_posts"
369
370 *Jon Leighton*
371
10834e9 @joshsusser changelog & docs for GeneratedFeatureMethods
joshsusser authored Nov 27, 2011
372 * Generated association methods are created within a separate module to allow overriding and
373 composition using `super`. For a class named `MyModel`, the module is named
374 `MyModel::GeneratedFeatureMethods`. It is included into the model class immediately after
375 the `generated_attributes_methods` module defined in ActiveModel, so association methods
376 override attribute methods of the same name. *Josh Susser*
377
e7b7b44 @fxn implements AR::Relation#explain
fxn authored Sep 20, 2011
378 * Implemented ActiveRecord::Relation#explain. *fxn*
379
562583c @jonleighton Add ActiveRecord::Relation#uniq for toggling DISTINCT in the SQL query
jonleighton authored Nov 4, 2011
380 * Add ActiveRecord::Relation#uniq for generating unique queries.
381
382 Before:
383
384 Client.select('DISTINCT name')
385
386 After:
387
388 Client.select(:name).uniq
389
390 This also allows you to revert the unqueness in a relation:
391
392 Client.select(:name).uniq.uniq(false)
393
394 *Jon Leighton*
395
69dcd45 @vjebelev AR changes to support creating ordered (asc, desc) indexes
vjebelev authored Nov 4, 2011
396 * Support index sort order in sqlite, mysql and postgres adapters. *Vlad Jebelev*
397
281272a @jonleighton Convert CHANGELOGs to Markdown format.
jonleighton authored Nov 4, 2011
398 * Allow the :class_name option for associations to take a symbol (:Client) in addition to
399 a string ('Client').
400
401 This is to avoid confusing newbies, and to be consistent with the fact that other options
402 like :foreign_key already allow a symbol or a string.
403
404 *Jon Leighton*
405
406 * In development mode the db:drop task also drops the test database. For symmetry with
407 the db:create task. *Dmitriy Kiriyenko*
408
409 * Added ActiveRecord::Base.store for declaring simple single-column key/value stores *DHH*
410
411 class User < ActiveRecord::Base
412 store :settings, accessors: [ :color, :homepage ]
413 end
414
415 u = User.new(color: 'black', homepage: '37signals.com')
416 u.color # Accessor stored attribute
417 u.settings[:country] = 'Denmark' # Any attribute, even if not specified with an accessor
418
419
420 * MySQL: case-insensitive uniqueness validation avoids calling LOWER when
421 the column already uses a case-insensitive collation. Fixes #561.
422
423 *Joseph Palermo*
424
425 * Transactional fixtures enlist all active database connections. You can test
426 models on different connections without disabling transactional fixtures.
427
428 *Jeremy Kemper*
429
430 * Add first_or_create, first_or_create!, first_or_initialize methods to Active Record. This is a
431 better approach over the old find_or_create_by dynamic methods because it's clearer which
432 arguments are used to find the record and which are used to create it:
433
434 User.where(:first_name => "Scarlett").first_or_create!(:last_name => "Johansson")
435
436 *Andrés Mejía*
437
438 * Fix nested attributes bug where _destroy parameter is taken into account
439 during :reject_if => :all_blank (fixes #2937)
440
441 *Aaron Christy*
2809375 @fxn registers 2483460 in the CHANGELOG
fxn authored Jan 26, 2012
442
04d5eae @bdurand Add ActiveSupport::Cache::NullStore to expose caching interface witho…
bdurand authored Dec 12, 2011
443 * Add ActiveSupport::Cache::NullStore for use in development and testing.
444
445 *Brian Durand*
281272a @jonleighton Convert CHANGELOGs to Markdown format.
jonleighton authored Nov 4, 2011
446
8efced6 @fxn CHANGELOGs are now per branch
fxn authored Aug 28, 2012
447 Please check [3-1-stable](https://github.com/rails/rails/blob/3-1-stable/activerecord/CHANGELOG.md) for previous changes.
Something went wrong with that request. Please try again.