aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
Commit message (Collapse)AuthorAgeFilesLines
* Fix lookup of fixtures with non-string labelPrathamesh Sonpatki2015-01-061-0/+4
| | | | | | | | | | | - Fixtures with non-string labels such as integers should be accessed using integer label as key. For eg. pirates(1) or pirates(42). - But this results in NotFound error because the label is converted into string before looking up into the fixtures hash. - After this commit, the label is converted into string only if its a symbol. - This issue was fount out while adding a test case for https://github.com/rails/rails/commit/7b910917.
* Merge pull request #18350 from brainopia/fix_build_from_bind_valuesSean Griffin2015-01-051-1/+9
|\ | | | | Propagate bind_values from join in subquery
| * Correctly fetch bind_values from join in subquerybrainopia2015-01-061-1/+9
| |
* | Whitespace fixes from #18349Sean Griffin2015-01-051-2/+1
| |
* | Merge pull request #18349 from jdelStrother/primarykeylessSean Griffin2015-01-051-0/+22
|\ \ | |/ |/| Fix rollback of primarykey-less tables
| * Fix rollback of primarykey-less tablesJonathan del Strother2015-01-051-0/+22
| | | | | | If you have a table without a primary key, and an `after_commit` callback on that table (ie `has_transactional_callbacks?` returns true), then trying to rollback a transaction involving that record would result in “ActiveModel::MissingAttributeError: can't write unknown attribute ``”
* | Add firebird support to test suiteRay Zane2015-01-054-21/+26
| |
* | Clean up secure_token_testJon Atack2015-01-051-5/+5
| |
* | remove deprecated support to preload instance-dependent associaitons.Yves Senn2015-01-051-22/+9
| | | | | | | | Addresses https://github.com/rails/rails/commit/ed56e596a0467390011bc9d56d462539776adac1#commitcomment-9145960
* | remove deprecated support for PG ranges with exclusive lower bounds.Yves Senn2015-01-051-27/+5
| | | | | | | | addresses https://github.com/rails/rails/commit/91949e48cf41af9f3e4ffba3e5eecf9b0a08bfc3#commitcomment-9144563
* | can't kill thread with in-memory db. fixes `rake test:sqlite3_mem`.Yves Senn2015-01-051-0/+2
| |
* | remove deprecation warning when modifying a Relation with cached arel.Yves Senn2015-01-051-0/+8
| | | | | | | | This adresses https://github.com/rails/rails/commit/1b7aa62b184c4410c99208f71b59bbac5c5f03be#commitcomment-9147803
* | Remove version conditional for calling GC.disableRafael Mendonça França2015-01-041-1/+1
| |
* | Remove Thread hack for Ruby 1.9claudiob2015-01-041-23/+18
| | | | | | | | | | | | | | | | The hack so skip a Thread test for Ruby 1.9 can be removed now that Rails requires Ruby >= 2.0. Conflicts: activerecord/test/cases/transactions_test.rb
* | Add has_secure_token to Active Recordrobertomiranda2015-01-041-0/+39
| | | | | | | | | | | | Update SecureToken Docs Add Changelog entry for has_secure_token [ci skip]
* | Change the behavior of boolean columns to be closer to Ruby's semantics.Rafael Mendonça França2015-01-041-6/+4
| | | | | | | | | | | | | | | | Before this change we had a small set of "truthy", and all others are "falsy". Now, we have a small set of "falsy" values and all others are "truthy" matching Ruby's semantics.
* | Change transaction callbacks to not swallowing errors.Rafael Mendonça França2015-01-042-44/+0
| | | | | | | | | | | | | | | | Before this change any error raised inside a transaction callback are rescued and printed in the logs. Now these errors are not rescue anymore and just bubble up, as the other callbacks.
* | Remove deprecated `sanitize_sql_hash_for_conditions`Rafael Mendonça França2015-01-041-11/+0
| |
* | Remove deprecated `ActiveRecord::Base.disable_implicit_join_references=`Rafael Mendonça França2015-01-041-6/+0
| |
* | Remove deprecated access to connection specification using a string acessor.Rafael Mendonça França2015-01-041-38/+0
| | | | | | | | Now all strings will be handled as a URL.
* | Change the default `null` value for `timestamps` to `false`Rafael Mendonça França2015-01-042-61/+27
| |
* | Return an array of pools from `connection_pools`Rafael Mendonça França2015-01-041-3/+1
| |
* | Return a null column from `column_for_attribute` when no column exists.Rafael Mendonça França2015-01-041-4/+18
| | | | | | | | | | | | | | | | This reverts commit ae96f229f6501d8635811d6b22d75d43cdb880a4. Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/attribute_methods.rb
* | Remove deprecated `serialized_attributes`Rafael Mendonça França2015-01-041-6/+0
| |
* | Remove `cache_attributes` and friendsRafael Mendonça França2015-01-041-14/+0
| |
* | Remove deprecated automatic counter caches on `has_many :through`Rafael Mendonça França2015-01-041-26/+0
| |
* | Remove deprecated `ActiveModel::Dirty#reset_#{attribute}` and ↵Rafael Mendonça França2015-01-041-12/+0
| | | | | | | | `ActiveModel::Dirty#reset_changes`.
* | Remove deprecated methods at `Kernel`.Rafael Mendonça França2015-01-042-1/+23
|/ | | | `silence_stderr`, `silence_stream`, `capture` and `quietly`.
* Prefer `array?` rather than `array`Ryuta Kamizono2015-01-0415-22/+22
| | | | | | Slightly refactoring `PostgreSQLColumn`. `array` should be readonly. `default_function` should be initialized by `super`. `sql_type` has been removed `[]`. Since we already choose to remove it we should not change.
* Merge pull request #17227 from claudiob/explicitly-abort-callbacksRafael Mendonça França2015-01-033-21/+158
|\ | | | | | | | | | | | | Introduce explicit way of halting callback chains by throwing :abort. Deprecate current implicit behavior of halting callback chains by returning `false` in apps ported to Rails 5.0. Completely remove that behavior in brand new Rails 5.0 apps. Conflicts: railties/CHANGELOG.md
| * Deprecate `false` as the way to halt AR callbacksclaudiob2015-01-023-21/+158
| | | | | | | | | | | | | | | | | | | | Before this commit, returning `false` in an ActiveRecord `before_` callback such as `before_create` would halt the callback chain. After this commit, the behavior is deprecated: will still work until the next release of Rails but will also display a deprecation warning. The preferred way to halt a callback chain is to explicitly `throw(:abort)`.
* | Merge pull request #18307 from brainopia/datetime_regressionRafael Mendonça França2015-01-021-0/+8
|\ \ | |/ |/| Fully support datetime values in AR::Type::DateTime#type_cast_for_database
| * Support datetime values in AR::Type::DateTime#type_cast_for_databasebrainopia2015-01-031-0/+8
| |
* | Don't test invalid log encoding against PostgreSQL adapterRafael Mendonça França2015-01-021-4/+6
| | | | | | | | It already treats the message
* | Merge pull request #8547 from printercu/patch-1Rafael Mendonça França2015-01-021-0/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | fix for messages in invalid encoding from db-drivers Conflicts: activerecord/lib/active_record/connection_adapters/abstract_adapter.rb activerecord/test/cases/connection_adapters/abstract_adapter_test.rb
| * | fix for messages in invalid encoding from db-driversMax Melentiev2013-12-071-0/+9
| | |
* | | Merge pull request #17820 from fw42/restore_query_cache_on_rollbackRafael Mendonça França2015-01-021-0/+32
|\ \ \ | | | | | | | | | | | | Clear query cache on rollback
| * | | Restore query cache on rollbackFlorian Weingarten2014-12-011-0/+32
| | | |
* | | | Merge pull request #15309 from iantropov/issue_12698_build_throughRafael Mendonça França2015-01-021-1/+10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add setting of FK for throgh associations while building Conflicts: activerecord/CHANGELOG.md activerecord/test/cases/associations/has_many_through_associations_test.rb
| * | | | Add setting of FK for throgh associations while buildingIvan Antropov2014-05-251-1/+10
| | | | |
* | | | | Merge pull request #18228 from kamipo/correctly_dump_primary_keyRafael Mendonça França2015-01-021-0/+19
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | Improve a dump of the primary key support. Conflicts: activerecord/CHANGELOG.md
| * | | | Improve a dump of the primary key support.Ryuta Kamizono2014-12-291-0/+19
| | | | | | | | | | | | | | | | | | | | If it is not a default primary key, correctly dump the type and options.
* | | | | Remove support to activerecord-deprecated_findersRafael Mendonça França2015-01-022-3/+2
| | | | |
* | | | | Merge pull request #18067 from ↵Rafael Mendonça França2015-01-023-0/+181
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/format_datetime_string_according_to_precision Format the datetime string according to the precision of the datetime field. Conflicts: activerecord/CHANGELOG.md
| * | | | | Format the datetime string according to the precision of the datetime field.Ryuta Kamizono2015-01-022-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Incompatible to rounding behavior between MySQL 5.6 and earlier. In 5.5, when you insert `2014-08-17 12:30:00.999999` the fractional part is ignored. In 5.6, it's rounded to `2014-08-17 12:30:01`: http://bugs.mysql.com/bug.php?id=68760
| * | | | | Allow precision option for MySQL datetimes.Ryuta Kamizono2015-01-023-0/+147
| | | | | |
* | | | | | Merge pull request #15746 from amccloud/auto-inverse_of-in-moduleRafael Mendonça França2015-01-021-0/+12
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed automatic inverse_of for models nested in module Conflicts: activerecord/CHANGELOG.md
| * | | | | | Fixed automatic inverse_of for models nested in moduleAndrew McCloud2014-06-151-0/+12
| | | | | | |
* | | | | | | Merge pull request #11898 from prathamesh-sonpatki/patch-updateRafael Mendonça França2015-01-022-2/+22
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed ActiveRecord::Relation#update behavior so that it will work on Relation objects without giving id Conflicts: activerecord/CHANGELOG.md
| * | | | | | Allow ActiveRecord::Relation#update to run on result of a relation with ↵Prathamesh Sonpatki2014-12-202-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | callbacks and validations - Right now, there is no method to update multiple records with validations and callbacks. - Changed the behavior of existing `update` method so that when `id` attribute is not given and the method is called on an `Relation` object, it will execute update for every record of the `Relation` and will run validations and callbacks for every record. - Added test case for validating that the callbacks run when `update` is called on a `Relation`. - Changed test_create_columns_not_equal_attributes test from persistence_test to include author_name column on topics table as it it used in before_update callback. - This change introduces performance issues when a large number of records are to be updated because it runs UPDATE query for every record of the result. The `update_all` method can be used in that case if callbacks are not required because it will only run single UPDATE for all the records.