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