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