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