aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
...
* | backport 68677ffb8298105eb9d3efa26d928dd88cc5e006Evan Petrie2012-09-282-0/+8
| |
* | ConnectionPool accepts spec key 'checkout_timeout'Jonathan Rochkind2012-09-242-2/+24
| | | | | | | | | | | | | | Backport of #6441 cb6f83935 . Old 'wait_timeout' is still supported, but conflicts with mysql2 using that spec key for different thing. 'checkout_timeout' can now be used taking precedence for ConnectionPool over 'wait_timeout'.
* | Merge pull request #3544 from amatsuda/_field_changedAaron Patterson2012-09-211-1/+15
| | | | | | | | | | | | | | | | Rename field_changed? to _field_changed? so that users can create a field named field Conflicts: activerecord/lib/active_record/core.rb activerecord/test/cases/dirty_test.rb
* | Revert "backport fair connection pool 02b2335563 to 3-2-stable"Rafael Mendonça França2012-09-205-116/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0693e079708a52b777f2b7872b8e3d467b880a0d. Revert "Cache columns metadata to avoid extra while testing" This reverts commit a82f1e3f5d11c8dfba9f4c911745ec40a7965216. Reason: This is causing failures in the postgresql build. See http://travis-ci.org/#!/rails/rails/builds/2485584 Related with #7675
* | Cache columns metadata to avoid extra while testingRafael Mendonça França2012-09-183-1/+11
|/
* backport fair connection pool 02b2335563 to 3-2-stableJonathan Rochkind2012-09-172-1/+105
|
* Merge pull request #7661 from ernie/build-join-records-on-unsaved-hmtRafael Mendonça França2012-09-171-0/+5
| | | | Fix collection= on hm:t join models when unsaved
* Merge pull request #7666 from ↵Rafael Mendonça França2012-09-171-1/+1
| | | | | | kennyj/fix_9fa3f102813eeeec440abd75870dfa7b23835665 Fix warning: method redefine. Testcase name are duplicated.
* Merge pull request #7651 from steveklabnik/issue_3956Rafael Mendonça França2012-09-161-1/+31
| | | | | | | | | Don't preserve SELECT columns on COUNT Closes #7651 Conflicts: activerecord/test/cases/associations/has_many_associations_test.rb
* Backport explain fixes.Rafael Mendonça França2012-09-161-1/+8
| | | | | | | | * Mark as SCHEMA some schema database queries. #7648 * Don't explain queries except normal CRUD sql. #7657 Closes #6458 Closes #7544
* `skip` in Ruby 1.8 doesn't skip the test case without returnRafael Mendonça França2012-09-131-1/+1
|
* Backport PostgreSQL auto-reconnect test coverageSteve Jorgensen2012-09-132-0/+76
| | | | | | | | | | | | | | | | 6d5f4de4c420ebb906109668f5702a537ac77692 Simulated & actual (manual/skipped) PostgreSQL auto-reconnection tests. 4b1bca04025a66c54e6e9d5eb6e4d4056bfa92f0 Stop being silly with formatting of method aliasing. c381d5cbf959208adeb38e7859ee815dfbd2cf54 Fix just-plain-wrongness of psql auto-reconnect test. 1e17a9d367c54c680368be72f44247ae28b98904 Fix only-once stub logic. f16c2043826ec1991cf94fe17cb671507b7a7f51 Changelog for PostgreSQL auto-reconnect test coverage backport.
* Merge pull request #7582 from tchandy/fix_type_cast_codeRafael Mendonça França2012-09-092-0/+30
|\ | | | | type_cast_code should always convert values to integer calling #to_i
| * ConnectionAdapters::Column.type_cast_code should always convert values to ↵Thiago Pradi2012-09-092-0/+30
| | | | | | | | integer calling #to_i
* | Fix AR tests due to builder change with nil values / empty stringsCarlos Antonio da Silva2012-09-071-6/+6
| | | | | | | | | | Check 0180e090ab6cbe66f7b521a0c03e278a0463accd for more reasoning about that.
* | Merge pull request #7337 from adzap/string_to_dummy_timeRafael Mendonça França2012-09-051-0/+12
| | | | | | | | | | | | Fix for time type columns with invalid time value Conflicts: activerecord/CHANGELOG.md
* | set the configured #inheritance_column on #become (#7503)Yves Senn2012-09-034-1/+37
|/ | | | | | | | | | | | | | | | | | | I had to create a new table because I needed an STI table, which does not have both a "type" and a "custom_type" the test fails with: 1) Error: test_alt_becomes_works_with_sti(InheritanceTest): NoMethodError: undefined method `type=' for #<Cabbage id: 1, name: "my cucumber", custom_type: "Cucumber"> /Users/username/Projects/rails/activemodel/lib/active_model/attribute_methods.rb:432:in `method_missing' /Users/username/Projects/rails/activerecord/lib/active_record/attribute_methods.rb:100:in `method_missing' /Users/username/Projects/rails/activerecord/lib/active_record/persistence.rb:165:in `becomes' test/cases/inheritance_test.rb:134:in `test_becomes_works_with_sti' test/cases/inheritance_test.rb:140:in `test_alt_becomes_works_with_sti' Conflicts: activerecord/test/cases/inheritance_test.rb
* Ensure association preloading properly merges default scope and association ↵Pratik Naik2012-08-283-0/+24
| | | | | | | | conditions Conflicts: activerecord/test/models/reader.rb
* Use Ruby 1.8 hash syntaxCarlos Antonio da Silva2012-08-212-3/+3
| | | | Introduced in backport 648c5a1369ed64608c3ca43a5ebc917687d20010.
* Use a model without counter cache to test read-only attributesRafael Mendonça França2012-08-211-9/+10
|
* Merge pull request #5210 from Pliny/masteriRafael Mendonça França2012-08-216-1/+29
| | | | | | | | Fix for #5200 Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/counter_cache.rb
* Merge pull request #6986 from kennyj/fix_6975Rafael Mendonça França2012-08-211-0/+15
| | | | | | | Fix #6975. Round usec when writing timestamp attribute. Conflicts: activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
* Merge pull request #7377 from ↵Carlos Antonio da Silva2012-08-211-0/+6
| | | | | | | | | | | brainopia/use_inversed_parent_for_first_and_last_child Use inversed parent for first and last child of has_many association [Backport] Closes #3223. Conflicts: activerecord/lib/active_record/associations/collection_association.rb
* Table#remove passed an array to remove_column, which is deprecated.Joe Rafaniello2012-08-181-2/+2
| | | | See 02ca9151a043a4fefbb3f22edd05f0cd392fffaa
* Merge pull request #7352 from aripollak/microsecond-timestampRafael Mendonça França2012-08-172-1/+2
| | | | | | Fix occasional microsecond conversion inaccuracy Conflicts: activerecord/CHANGELOG.md
* Do not use update_column where update_attribute is not interchangeableRafael Mendonça França2012-08-154-30/+21
| | | | | | | | | | | | Revert "Deprecate update_attribute." This reverts commit b081f6b59fb3f15d12043072ad9b331ffd2bc56e. Reason: Since the new deprecation policy we removed the deprecation of update_attribute but we didn't reverted the changes to use update_column. Fixes #7306
* Merge pull request #6073 from daveyeu/restore-state-on-record-invalidRafael Mendonça França2012-08-111-0/+17
| | | | | | Restore state on create when ActiveRecord::RecordInvalid is raised Conflicts: activerecord/CHANGELOG.md
* Merge pull request #7286 from kennyj/fix_7191Rafael Mendonça França2012-08-101-0/+13
| | | | | | Fix #7191. Remove unnecessary transaction when assigning has_one associations. Conflicts: activerecord/test/cases/associations/has_one_associations_test.rb
* Backport #7173.Jeremy Walker2012-08-091-2/+4
|
* Ported PR #4856 to 3-2-stable.Jeremy Walker2012-08-093-2/+13
|
* Do not consider the numeric attribute as changed if the old value isRafael Mendonça França2012-08-021-1/+14
| | | | | | | | | | | | | | | | | | | | zero and the new value is not a string. Before this commit this was the behavior r = Review.find_by_issue(0) r.issue => 0 r.changes => {} r.issue = 0 => 0 r.changed? => true r.changes => {"issue"=>[0,0]} Fixes #7237
* Backport #5168 to 3-2-stable. Fix a problem that NULLS is ignored by ↵kennyj2012-08-021-0/+5
| | | | postgresql_adapter.rb while creating distincts.
* Revert "Deprecating composed_of in ActiveRecord"Rafael Mendonça França2012-08-013-15/+7
| | | | This reverts commit 44b313bc4e3762da64dde7894548f81c595147de.
* Revert "Deprecate :finder_sql, :counter_sql, :insert_sql, :delete_sql."Jon Leighton2012-08-015-76/+35
| | | | | | | | | | This reverts commit a79bfa92e7bdc31b346d13ee5447d3fdac382bfb. Conflicts: activerecord/CHANGELOG.md We shouldn't introducing deprecations in point releases. It will be deprecated in 4.0 instead.
* Revert "Add update_columns and the suggestion of using update_columnsRafael Mendonça França2012-07-301-57/+0
| | | | | | | | | | | | | | | | instead of update_column" This reverts commit 9fa06c3d9811113259cb6e00a3a8454b3974add7. This reverts commit 17a64de4980683da3ca3c185205013a29a8cf88d. This reverts commit def9c85ffbdcf63e6c412b6bd4abafaa32ccdb5c, reversing changes made to 6b7d26cf3c061907aedc44f7f36776c9b36950fd. Reason: This was supposed to be released with 3.2.7 before the suggestion to use update_column. Since it was not release now is not good to suggest to use another method because it will confusing the people.
* Fix AR#update_columns tests on Ruby 1.8.7Carlos Antonio da Silva2012-07-251-7/+7
|
* New #update_columns method.Sebastian Martinez2012-07-261-0/+57
|
* Deprecate :finder_sql, :counter_sql, :insert_sql, :delete_sql.Jon Leighton2012-07-205-35/+76
|
* Merge pull request #6616 from dpassage/fix_resolver_test_sqlite3Carlos Antonio da Silva2012-07-191-0/+3
| | | | Resolver tests fail if mysql adapter not installed
* AR::Integration must be included after AM::ConversionJohn Firebaugh2012-07-171-0/+6
| | | | | | Integration's definition of #to_param must override Conversion's. Otherwise, there is a regression from 3.1 in the behavior of a non-persisted AR::Base instance which nevertheless has an id.
* Merge pull request #4396 from kennyj/fix_4259Rafael Mendonça França2012-07-171-0/+32
| | | | Fix GH #4259. When we execute schema dumper, we must remove table_name_prefix and table_name_suffix.
* fixing tests to deal with data differences between prepared statements and ↵Aaron Patterson2012-07-133-3/+8
| | | | non-prepared statements
* Update psql adapter to rename a default pkey sequence during rename_table.Robb Kidd2012-07-101-0/+20
|
* Merge pull request #6985 from sidonath/disable-query-cache-for-locksRafael Mendonça França2012-07-061-0/+8
| | | | | | Disable query cache for lock queries Conflicts: activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
* Backport #3329 to 3-2-stableFrancesco Rodriguez2012-07-021-0/+10
| | | | | | | Fix bug with autosave collection association on new record with a marked for destroy record in autosave collection. Fixes #6918.
* Merge pull request #6878 from masarakki/masterRafael Mendonça França2012-06-284-0/+39
| | | | | | fix bug in limit of enum columns of mysql Closes #6432
* Ensure Arel columns are typecasted properly when grouping with calculationCarlos Antonio da Silva2012-06-251-2/+6
| | | | | | | | Fix build issue with postgresql. Conflicts: activerecord/lib/active_record/relation/calculations.rb activerecord/test/cases/calculations_test.rb
* Merge pull request #6842 from ernie/handle-non-strings-in-grouped-calculationsRafael Mendonça França2012-06-241-0/+5
| | | | | | 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-211-0/+10
| | | | | | | Closes #6675 Conflicts: activerecord/lib/active_record/attribute_methods/dirty.rb