aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
...
* | Add :nsec format only for Ruby 1.9Carlos Antonio da Silva2012-12-112-0/+5
| | | | | | | | | | | | Ruby 1.8 does not support this format in Time, so the format will only be added to the available date formats on Ruby 1.9. Changelog entry was changed to explain that as well.
* | Run backported serialized test without Identity MapCarlos Antonio da Silva2012-12-111-2/+4
| | | | | | | | | | | | It fails with Identity Map because the find call returns the same object, so the "content" attribute that we expect to raise "missing attribute" is actually present.
* | Use 1.8 hash style :bomb:Carlos Antonio da Silva2012-12-111-2/+2
| |
* | Merge pull request #8441 from itzki/fix_decorate_columnsCarlos Antonio da Silva2012-12-111-0/+13
| | | | | | | | | | Backport test to ensure there won't be regressions. The issue only happens on master at the moment.
* | Add CHANGELOG entry for #6376.Rafael Mendonça França2012-12-101-0/+4
| |
* | Allow users to choose the timestamp format in the cache keyRafael Mendonça França2012-12-104-2/+34
| | | | | | | | | | | | This can be done using the class attribute cache_timestamp_format Closes #8195
* | Make sure the tests pass in the case closer to described in #8195Rafael Mendonça França2012-12-104-19/+14
| |
* | Merge pull request #6376 from jgaskins/timestamp-microsecondsJeremy Kemper2012-12-102-2/+2
| | | | | | | | | | | | Increase numeric-timestamp precision to nanoseconds Conflicts: activesupport/lib/active_support/core_ext/time/conversions.rb
* | Added regression test for #8195.jacobstr2012-12-101-0/+18
| |
* | Remove warning of unused variableRafael Mendonça França2012-12-101-1/+1
| |
* | Unscope update_column(s) query to ignore default scopeCarlos Antonio da Silva2012-12-063-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When applying default_scope to a class with a where clause, using update_column(s) could generate a query that would not properly update the record due to the where clause from the default_scope being applied to the update query. class User < ActiveRecord::Base default_scope where(active: true) end user = User.first user.active = false user.save! user.update_column(:active, true) # => false In this situation we want to skip the default_scope clause and just update the record based on the primary key. With this change: user.update_column(:active, true) # => true Backport of #8436 fix. Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/persistence.rb activerecord/test/cases/persistence_test.rb
* | Merge pull request #8417 from kennyj/fix_8414Rafael Mendonça França2012-12-042-3/+8
| | | | | | | | | | | | Fix #8414. Performance problem with postgresql adapter primary_key function. Conflicts: activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
* | backport #8403, no intermediate AR objects when eager loading.Yves Senn2012-12-044-2/+26
| | | | | | | | | | | | | | | | | | Closes #3313 Conflicts: activerecord/CHANGELOG.md activerecord/test/models/developer.rb
* | Merge pull request #4942 from bogdan/pluck_joinsJosé Valim2012-12-033-1/+20
| | | | | | | | | | | | | | | | AR::Relation#pluck: improve to work with joins Conflicts: activerecord/lib/active_record/relation/calculations.rb activerecord/test/cases/calculations_test.rb
* | handled respond_to? with private methodsSHIBATA Hiroshi2012-12-031-1/+1
| |
* | Make the CHANGELOG consistent [ci skip]Rafael Mendonça França2012-11-301-11/+20
| |
* | Merge pull request #6397 from kennyj/fix_translate_exceptionAaron Patterson2012-11-302-3/+12
| | | | | | | | Fix a problem of translate_exception method in a Japanese (non English) environment.
* | Backport 78b30fed9336336694fb2cb5d2825f95800b541c to fix non-utf-8 databases ↵Jeremy Kemper2012-11-291-5/+19
| | | | | | | | mistakenly getting utf8 collation
* | Merge pull request #7689 from cbarton/assume_migration_version_with_prefix_fixAaron Patterson2012-11-282-9/+29
|\ \ | | | | | | Fixing a schema:load when using a prefix and suffix on the tables [Reopen/backport]
| * | Making test accurately reflect what is going on in the schema migrations testChris Barton2012-09-182-9/+29
| | |
* | | Work around undiagnosed bug that's draining a relation's bind_valuesJeremy Kemper2012-11-281-0/+1
| | |
* | | Use 1.8 hash style in pg specific schemaCarlos Antonio da Silva2012-11-281-3/+3
| | |
* | | schema cache already has the columns as a hash, so use thatAaron Patterson2012-11-261-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commits 978ec98c8eff824a60c7e973f369cc7bed1f4d36 and 51676652a3568ad09b06385564de4fdcb13af05e changed database statements to use the schema_cache methods, added on master in c99e34e90d763c52cbe8dc3d950ed1b4db665dc4 and dc973e78560a6514ab172f0ee86dc84a9147d39a But apparently the methods weren't added to schema_cache, resulting in the failure described in #8322 for 3-2-stable. Fixes #8322. Conflicts: activerecord/lib/active_record/connection_adapters/schema_cache.rb
* | | schema cache already has the columns as a hash, so use thatAaron Patterson2012-11-251-1/+1
| | |
* | | speed up fixture loading by querying the schema cache for column namesAaron Patterson2012-11-251-1/+1
| | |
* | | Merge pull request #8311 from alisdair/dirty-nullable-datetimeCarlos Antonio da Silva2012-11-253-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't call will_change! for datetime nil->"". Setting a nil datetime attribute to a blank string should not cause the attribute to be dirty. Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
* | | backport #8291, prevent mass assignment of polymorphic type with `build`Yves Senn2012-11-223-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #8265 Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/associations/association.rb
* | | Merge pull request #8276 from pwnall/pgsql_text_limitsRafael Mendonça França2012-11-204-0/+35
| | | | | | | | | | | | | | | | | | | | | Postgresql doesn't accepts limits on text columns Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
* | | Be a bit less conservative with mysql in adapterCarlos Antonio da Silva2012-11-191-1/+1
| | | | | | | | | | | | This will allow the new mysql 2.9.0 to be used, fixing our test issues.
* | | Merge pull request #8258 from kommen/eager_loading_with_select_test2Carlos Antonio da Silva2012-11-191-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add test to ensure preloading works as expected with "group", "select" and "includes". Conflicts: activerecord/test/cases/relations_test.rb Chery-pick a739340d3c9e66814429af6f3f410c01ff86810a: Ensure ordering to make the test pass with postgresql Conflicts: activerecord/test/cases/relations_test.rb
* | | Merge pull request #7983 from georgebrock/bug7950-squashedCarlos Antonio da Silva2012-11-168-12/+48
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport 4bc2ae0 to fix #7950 Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/relation/calculations.rb
| * | | Test/changelog for has_many bug on unsaved recordsGeorge Brocklehurst2012-11-102-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | See issue #7950. The previous commit fixes this bug, and is a backport of 4bc2ae0da1dd812aee759f6d13ad428354cd0e13.
| * | | use bind values for join columnsAaron Patterson2012-11-106-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of 4bc2ae0da1dd812aee759f6d13ad428354cd0e13. It fixes bug #7950. Conflicts: activerecord/lib/active_record/relation/calculations.rb activerecord/lib/active_record/relation/finder_methods.rb
* | | | fix testJon Leighton2012-11-131-3/+3
| | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/test/cases/locking_test.rb
* | | | Merge pull request #8209 from senny/backport_8176Rafael Mendonça França2012-11-133-1/+18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | backport #8176, `#pluck` can be used on a relation with `select` clause. Conflicts: activerecord/CHANGELOG.md
| * | | | backport #8176, `#pluck` can be used on a relation with `select` clause.Yves Senn2012-11-133-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/relation/calculations.rb activerecord/test/cases/calculations_test.rb
* | | | | Merge pull request #8204 from nikitug/fix_dynamic_finder_result_checkRafael Mendonça França2012-11-134-2/+21
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use nil? instead of blank? to check dynamic finder result Conflicts: activerecord/CHANGELOG.md
| * | | | | Use nil? instead of blank? to check dynamic finder resultNikita Afanasenko2012-11-134-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's safe to use `nil?` instead of `blank?` because it's impossible to get an array on finder with bang; `all_by` finder matches against regex without bang: `when /^find_(all_|last_)?by_([_a-zA-Z]\w*)$/`. Fixes #7238
* | | | | | Fix deleting from a HABTM join table upon destroying an object of a model ↵Nick Rogers2012-11-136-1/+31
|/ / / / / | | | | | | | | | | | | | | | with optimistic locking enabled. Fixes #5332.
* / / / / Backport #8074 to 3-2-stable. Use query cache/uncache, when using not only ↵kennyj2012-11-143-6/+22
|/ / / / | | | | | | | | | | | | database.yml but also DATABASE_URL.
* | | | Fix warning with assigned but not used variableCarlos Antonio da Silva2012-11-131-3/+3
| | | |
* | | | Update mocha version to 0.13.0 and change requiresCarlos Antonio da Silva2012-11-131-1/+1
| | | |
* | | | Add release date of Rails 3.2.9 to documentationclaudiob2012-11-121-1/+1
| | | |
* | | | Merge pull request #8154 from bogdan/has_one_association_performanceCarlos Antonio da Silva2012-11-123-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unwanted transaction when has one association is built Conflicts: activerecord/CHANGELOG.md
* | | | Merge branch '3-2-9' into 3-2-stableSantiago Pastorino2012-11-121-1/+1
|\ \ \ \ | |/ / / |/| | / | | |/ | |/|
| * | Bump to 3.2.9Santiago Pastorino2012-11-121-1/+1
| | |
* | | Merge branch '3-2-9' into 3-2-stableSantiago Pastorino2012-11-091-1/+1
|\| |
| * | Bump up to 3.2.9.rc3Santiago Pastorino2012-11-091-1/+1
| | |
* | | Backport #8078: Fix `attributes_before_type_cast` for serialised attributes.Nikita Afanasenko2012-11-093-0/+24
| | | | | | | | | | | | Public method attributes_before_type_cast used to return internal AR structure (ActiveRecord::AttributeMethods::Serialization::Attribute), patch fixes this. Now behaves like read_attribute_before_type_cast and returns unserialised values.
* | | Merge pull request #7987 from ↵Santiago Pastorino2012-11-083-3/+28
|\ \ \ | | | | | | | | | | | | | | | | alexisbernard/3-2_find_in_batches_compatible_with_strings Fix find_in_batches with customized primary_key on 3-2-stable