aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #6842 from ernie/handle-non-strings-in-grouped-calculationsRafael Mendonça França2012-06-242-6/+22
| | | | | | Stop assuming strings for grouped calculations Conflicts: activerecord/lib/active_record/relation/calculations.rb
* Remove waning of unused variableRafael Mendonça França2012-06-211-1/+0
|
* Merge branch 'acapilleri-update_nested_attributes'Rafael Mendonça França2012-06-212-5/+25
| | | | | | | Closes #6675 Conflicts: activerecord/lib/active_record/attribute_methods/dirty.rb
* Merge pull request #6758 from caironoleto/masterJosé Valim2012-06-181-13/+13
| | | | | | Fixing load config in some tasks Conflicts: activerecord/lib/active_record/railties/databases.rake
* Deprecating composed_of in ActiveRecordSteve Klabnik2012-06-185-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature adds a lot of complication to ActiveRecord for dubious value. Let's talk about what it does currently: class Customer < ActiveRecord::Base composed_of :balance, :class_name => "Money", :mapping => %w(balance amount) end Instead, you can do something like this: def balance @balance ||= Money.new(value, currency) end def balance=(balance) self[:value] = balance.value self[:currency] = balance.currency @balance = balance end Since that's fairly easy code to write, and doesn't need anything extra from the framework, if you use composed_of today, you'll have to add accessors/mutators like that. This feature will be removed in Rails 4.
* Remove unneded tests.Rafael Mendonça França2012-06-141-11/+1
| | | | | | | Before b081f6b59fb3f15d12043072ad9b331ffd2bc56e, this test are asserting that update_attribute does the dirty tracking. Since we deprecated this method and update_column write in the database directly this tests will always fail.
* registers the deprecation of update_attribute in the CHANGELOGXavier Noria2012-06-141-0/+8
|
* Deprecate update_attribute.Steve Klabnik2012-06-147-17/+41
| | | | | | | | | | | Historically, update_attribute and update_attributes are similar, but with one big difference: update_attribute does not run validations. These two methods are really easy to confuse given their similar names. Therefore, update_attribute is being deprecated in favor of update_column, and will be removed in Rails 4. See the discussion on rails-core here: https://groups.google.com/d/topic/rubyonrails-core/BWPUTK7WvYA/discussion
* Merge branch '3-2-stable-rel' into 3-2-stableAaron Patterson2012-06-124-5/+17
|\ | | | | | | | | | | | | | | | | | | * 3-2-stable-rel: updating changelogs bumping version numbers updating changelogs with security fixes updating changelogs Array parameters should not contain nil values. Additional fix for CVE-2012-2661
| * updating changelogsAaron Patterson2012-06-121-1/+3
| |
| * bumping version numbersAaron Patterson2012-06-111-1/+1
| |
| * updating changelogs with security fixesAaron Patterson2012-06-111-0/+4
| |
| * Additional fix for CVE-2012-2661Ernie Miller2012-06-112-3/+9
| | | | | | | | | | | | | | | | While the patched PredicateBuilder in 3.1.5 prevents a user from specifying a table name using the `table.column` format, it doesn't protect against the nesting of hashes changing the table context in the next call to build_from_hash. This fix covers this case as well.
* | Merge pull request #6715 from arunagw/add_assertsRafael Mendonça França2012-06-121-2/+2
| | | | | | | | Need a assert here in tests
* | Merge pull request #6676 from aurelian/masterRafael Mendonça França2012-06-122-1/+5
|/ | | | Don't assign the attributes if the list is empty
* Change the string to use in test case.kennyj2012-06-112-2/+2
| | | | | | | Conflicts: activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb activerecord/test/cases/adapters/mysql2/schema_test.rb
* Fix GH #3163. Should quote database on mysql/mysql2.kennyj2012-06-113-1/+22
| | | | | | Conflicts: activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
* Merge pull request #6698 from yahonda/address_ora_911_masterRafael Mendonça França2012-06-112-2/+2
| | | | Address ORA-00911 errors because of the heading underscore.
* Merge pull request #6521 from Empact/throw-resultRafael Mendonça França2012-06-102-1/+8
| | | | | | Fix that #exists? can blow up with ThrowResult exception Conflicts: activerecord/lib/active_record/relation/finder_methods.rb
* Remove warningRafael Mendonça França2012-06-101-1/+1
|
* Add test to column alias in `exists?` SQL.Rafael Mendonça França2012-06-101-0/+6
| | | | | | | | This behavior was added in dd286a4c735dac1db8c9262581c7f29c44d1f695 Closes #1139. Fixes #2553, #1141, #1623 and #2062.
* Minimal change to query generation of exists? that makes SQLServer and ↵iaddict2012-06-101-1/+1
| | | | | | | others happy that do not work without a column alias. Conflicts: activerecord/lib/active_record/relation/finder_methods.rb
* Merge pull request #6695 from kennyj/fix_6635Rafael Mendonça França2012-06-102-5/+14
| | | | Fix #6635. We should call Scoping methods, before calling Array methods.
* ActiveRecord#attributes optimization: minimize objects createdTieg Zaharia2012-06-091-1/+3
|
* Make test cover previous reversionJon Leighton2012-06-071-0/+1
|
* Revert "Perf: Don't load the association for #delete_all."Jon Leighton2012-06-076-45/+21
| | | | | | | | | | This reverts commit b98d1e21635d8776de8893cc09bd86c71f6c78f0. Closes #6609 Conflicts: activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
* Fix #6591. If a field with timezone isn't changed, we don't call will_change!.kennyj2012-06-041-1/+2
|
* Add failing test for 3.2.5 datetime attribute regressionEvan Arnold2012-06-041-0/+11
|
* Merge pull request #6593 from ↵Rafael Mendonça França2012-06-011-1/+3
|\ | | | | | | | | yahonda/skip_test_remove_column_with_array_as_an_argument_is_deprecated Skip test_remove_column_with_array_as_an_argument_is_deprecated with Oracle
| * Skip test_remove_column_with_array_as_an_argument_is_deprecated with Oracle ↵Yasuo Honda2012-06-021-1/+3
| | | | | | | | | | | | | | adapter. Because Oracle adapter supports only remove_column :table_name, :column_name syntax and it has never supported remove_column :table_name, [:column_name].
* | Add release date of 3.2.5 on the CHANGELOGRafael Mendonça França2012-06-011-0/+9
|/
* bumping to 3.2.5Aaron Patterson2012-05-311-1/+1
|
* Restore behavior of Active Record 3.2.3 scopesAndrew White2012-06-014-31/+4
| | | | | | | | | | | | | | A series of commits relating to preloading and scopes caused a regression. Cloning the relation calls initialize_copy which resets a number of instance variables to nil. Without this the scope thinks that it is already loaded when it is called again. Reverts the following commits: 13f1401a6cf0266a3b0a91b173f976db2d4e50f3 8491740ca5361ba9df20e1c8b906c709f5bfbc12 dffbb521a0d00c8673a3ad6e0e8ff526f32daf4e Fixes #6575, #6576 & #6577
* Merge branch '3-2-rel' into 3-2-stableAaron Patterson2012-05-312-2/+11
|\ | | | | | | | | | | | | | | * 3-2-rel: bumping to 3.2.4 adding security notifications to CHANGELOGs updating changelogs Merge pull request #6558 from parndt/fix_regression
| * bumping to 3.2.4Aaron Patterson2012-05-311-1/+1
| |
| * adding security notifications to CHANGELOGsAaron Patterson2012-05-311-0/+3
| |
| * Merge branch '3-2-stable-sec' into 3-2-relAaron Patterson2012-05-313-4/+38
| |\ | | | | | | | | | | | | | | | * 3-2-stable-sec: Strip [nil] from parameters hash. Thanks to Ben Murphy for reporting this! predicate builder should not recurse for determining where columns. Thanks to Ben Murphy for reporting this
| * | updating changelogsAaron Patterson2012-05-311-1/+7
| | |
| * | Merge pull request #6558 from parndt/fix_regressionAaron Patterson2012-05-301-3/+4
| | | | | | | | | | | | Fix regression
* | | Merge branch '3-2-stable-sec' into 3-2-stableAaron Patterson2012-05-314-6/+40
|\ \ \ | | |/ | |/| | | | | | | | | | | | | * 3-2-stable-sec: Strip [nil] from parameters hash. Thanks to Ben Murphy for reporting this! predicate builder should not recurse for determining where columns. Thanks to Ben Murphy for reporting this bumping to 3.2.4.rc1
| * | predicate builder should not recurse for determining where columns.Aaron Patterson2012-05-303-4/+38
| |/ | | | | | | | | | | Thanks to Ben Murphy for reporting this CVE-2012-2661
| * bumping to 3.2.4.rc1Aaron Patterson2012-05-281-2/+2
| |
* | Revert "Removes unneeded caching from ActiveRecord::Base.relation"Philip Arndt2012-05-311-3/+4
| | | | | | | | | | | | | | | | | | | | This reverts commit ebfa58abc895c0639211cb896a47b04e424322c8. This change caused a regression in my application's tests: * Failing build http://travis-ci.org/#!/resolve/refinerycms/builds/1461242 Broken tests pass after this change is reverted.
* | Merge pull request #6477 from steveklabnik/close_discovered_pg_connectionRafael Mendonça França2012-05-301-1/+2
| | | | | | | | Properly discover a connection is closed in postgresql_adapter
* | Merge pull request #5810 from kennyj/fix_5797Aaron Patterson2012-05-304-5/+15
|/ | | | | | Fix #5797. Error calling dup method on AR model with serialized field Conflicts: activerecord/lib/active_record/core.rb
* Merge pull request #5244 from fotos/myqsl2_wait_timeoutRafael Mendonça França2012-05-251-1/+1
| | | | Maximum wait_timeout on Windows is 2147483
* Merge pull request #5925 from Juanmcuello/pg_structure_dumpCarlos Antonio da Silva2012-05-241-2/+2
|\ | | | | Quote arguments in db:structure:dump for PostgreSQL.
| * Use Shellwords to scape arguments in db:structure:dump for PostgreSQL.Juan M. Cuello2012-05-221-2/+2
| | | | | | | | fixes #5913
* | Synchronize the ConnectionPool#release method to avoid thread safety issues ↵Andrew Selder2012-05-231-10/+12
|/ | | | | | | | | | | | | | | | | | | | [#6464] Fixes #6464 Synchronize the contents of the release method in ConnectionPool due to errors when running in high concurrency environments. Detected invalid hash contents due to unsynchronized modifications with concurrent users org/jruby/RubyHash.java:1356:in `keys' /usr/local/rvm/gems/jruby-1.6.7@new_import/gems/activerecord-3.2.3/lib/a ctive_record/connection_adapters/abstract/connection_pool.rb:294:in `release' /usr/local/rvm/gems/jruby-1.6.7@new_import/gems/activerecord-3.2.3/lib/a ctive_record/connection_adapters/abstract/connection_pool.rb:282:in `checkin'
* Fixes the build break caused by 9ee8528 in #6445.Godfrey Chan2012-05-221-2/+4
| | | | | | | | Ruby 1.8 raises a TypeError when trying to modify a frozen Hash, while Ruby 1.9 raises a RuntimeError instead. Also, Ruby < 1.9.3 uses a lowercase 'hash' in the exception message while Ruby >= 1.9.3 uses an uppercase 'Hash' instead. This commit normalizes those issues in the test case.