Skip to content

HTTPS clone URL

Subversion checkout URL

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