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