aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
* Update after_commit and after_rollback docs and tests to use new style API ↵Brian Durand2010-04-291-6/+6
| | | | | | | | with an :on options instead of on_* suffix. [#2991] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add after_commit and after_rollback callbacks to ActiveRecord that are ↵Brian Durand2010-04-292-14/+291
| | | | | | | | called after transactions either commit or rollback on all records saved or destroyed in the transaction. [#2991 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* making rake:migrate VERSION=0 a noop called in succession. [#2137 ↵Neeraj Singh2010-04-291-0/+19
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Move several configuration values from Hash to ActiveSupport::XmlMini, which ↵José Valim2010-04-292-6/+3
| | | | | | both Hash and Array depends on. Also, refactored ActiveModel serializers to just use ActiveSupport::XmlMini.to_tag. As consequence, if a serialized attribute is an array or a hash, it's not encoded as yaml, but as a hash or array.
* Fix eager loading of associations causing table name collisionsErnie Miller2010-04-281-0/+9
| | | | | | [#4463 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Destroy respects optimistic locking.Curtis Hawthorne2010-04-271-3/+48
| | | | | | | | | | Now works with :dependent => :destroy and includes unit tests for that case. Also includes better error messages when updating/deleting stale objects. [#1966 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Support fixtures for namespaced models [#2965 state:resolved]Andrew White2010-04-257-1/+38
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Remove quoted_string_prefix entirely since PostgreSQL was the only database ↵Jeremy Kemper2010-04-241-2/+2
| | | | adapter relying on it.
* Missing require addedSantiago Pastorino2010-04-181-0/+1
|
* working around syck defects by optionally matching a space [#4426 ↵Aaron Patterson2010-04-171-1/+1
| | | | | | state:resolved] Signed-off-by: wycats <wycats@gmail.com>
* making yaml tests less specific to emitter. [#4425 state:resolved]Aaron Patterson2010-04-171-1/+2
| | | | Signed-off-by: wycats <wycats@gmail.com>
* fixing invalid yaml [#4424 state:resolved]Aaron Patterson2010-04-171-1/+2
| | | | Signed-off-by: wycats <wycats@gmail.com>
* ActiveModel::Observing: stop using Observable Ruby module, re-implement ↵Mislav Marohnić2010-04-161-0/+20
| | | | | | | | | `notify_observers` `Observable#notify_observers` from Ruby always returns false (which halts ActiveRecord callback chains) and has extra features (like `changed`) that were never used. Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* merge callbacks_observers_test.rb into lifecycle_test.rb where other ↵Mislav Marohnić2010-04-162-37/+34
| | | | | | | | observers test reside Benefits: test able to run independently, subclassing instead of changing the original Comment model Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* fix a failure and some warnings on 1.9.2 [#4417 state:resolved]Aaron Patterson2010-04-162-2/+2
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* Ensure not to load the entire association when bulk updating existing ↵Pratik Naik2010-04-141-1/+11
| | | | records using nested attributes
* Refactor compute_type to handle situations where the correct class is ↵Andrew White2010-04-127-9/+69
| | | | | | already loaded Signed-off-by: wycats <wycats@gmail.com>
* make ActiveRecord::Base.subclasses a public methodEmmanuel Oga2010-04-121-0/+4
| | | | Signed-off-by: wycats <wycats@gmail.com>
* table_name_prefix and table_name_suffix are class_attributes instead of ↵Phil Smith2010-04-121-7/+51
| | | | | | cattr_accessors. [#4230] Signed-off-by: José Valim <jose.valim@gmail.com>
* mode postgresql adapters table_exists? method take the schema in to account. ↵Aaron Patterson2010-04-111-0/+15
| | | | | | [#4341 state:resolved] Signed-off-by: wycats <wycats@gmail.com>
* clearing up many warnings, removing unnecessary regular expresion ↵Aaron Patterson2010-04-101-1/+1
| | | | | | comparisons [#4365 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Made arrays of ActiveRecords, and any classes, with namespaces convert to ↵mfoster2010-04-101-1/+11
| | | | | | valid xml. [#3824 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* clear the rest of the warnings, run with warnings turned on [#4332 ↵Aaron Patterson2010-04-101-25/+39
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* kill warnings on 1.8.7 [#4331 state:resolved]Aaron Patterson2010-04-101-4/+4
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Revert "When creating database with rake, create schemas in ↵Michael Koziarski2010-04-092-13/+0
| | | | | | | | | | | | | schema_search_path if it doesn't exist." This reverts commit 6c2a0675f11a9b5b8e88ed7dbccd65cb51be8029. Reverting because it breaks the ability to run tests using a non-superuser. Conflicts: activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb activerecord/lib/active_record/railties/databases.rake
* Dirty datetime attributes should be aware of time zone info [#3658 ↵Kristopher Murata2010-04-081-0/+95
| | | | | | state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Reset named scope cache whenever the @target is resetPratik Naik2010-04-071-0/+10
|
* Memoize association.named_scope callsPratik Naik2010-04-051-0/+9
|
* Add tests to prevent regression of lazy evaluation of has_many ..., ↵Andrew White2010-04-041-0/+18
| | | | | | | | :dependent => :___ [#2627 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add Relation extensionsPratik Naik2010-04-022-0/+22
|
* Add tests for postgresql column type mapping updates [#4270 state:resolved]Ernie Miller2010-03-311-0/+17
| | | | Signed-off-by: Emilio Tagua <miloops@gmail.com>
* Dont try to load the record from the db if preloading didn't find anythingPratik Naik2010-03-311-0/+6
|
* Fix failing test in MySQL.Emilio Tagua2010-03-301-3/+8
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Named scopes shouldn't test equality using to_a if it's not an Array, this ↵Emilio Tagua2010-03-301-3/+9
| | | | | | was causing records to be loaded before they were needed. Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix dom_id for ActiveRecord [#4296 state:resolved]José Valim2010-03-301-0/+6
|
* Fix honoring :primary_key option when joining or eager loading a belongs_to ↵Ernie Miller2010-03-291-0/+13
| | | | | | | | association [#765 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Warn scoped order and limit are ignored. [#4123 state:resolved]Emilio Tagua2010-03-291-3/+13
|
* Add the ability to specify table_name_prefix on individual modulesAndrew White2010-03-282-0/+45
| | | | Signed-off-by: wycats <wycats@gmail.com>
* defining a named_scope which overwrites an existing method is now allowed we ↵Matthew Rudy Jacobs2010-03-281-2/+15
| | | | | | | | | just log a warning. This was motivated by the fact that :open is defined on all classes as such the named_scope "open" can never be used, without hacking ActiveRecord with an "undef_method" [#4083 state:resolved] Signed-off-by: wycats <wycats@gmail.com>
* Add :dependent = to has_one and has_many [#3075 state:resolved]Rizwan Reza2010-03-284-2/+29
|
* When creating database with rake, create schemas in schema_search_path if it ↵Rizwan Reza2010-03-282-0/+13
| | | | doesn't exist.
* Revert "primary_key now supports :limit for MySQL". Break Sam Ruby app.José Valim2010-03-272-13/+2
| | | | | | To reproduce, start a new application, create a scaffold and run test suite. [#876 state:open] This reverts commit faeca694b3d4afebf6b623b493e86731e773c462.
* primary_key now supports :limit for MySQLRizwan Reza2010-03-272-2/+13
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Revert "primary_key now supports :limit. [#876 state:resolved]" since it ↵José Valim2010-03-272-13/+2
| | | | | | broke AR test suite. This reverts commit 41e5c7ed44fedb95636ef9b7a792c46ea03309bd.
* primary_key now supports :limit. [#876 state:resolved]Rizwan Reza2010-03-272-2/+13
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Revert "Changed behavior of touch and added touch! Originally implemented by ↵Pratik Naik2010-03-271-25/+0
| | | | | | Obie Fernandez, updated touch! to act as a thin wrapper to touch. [#2520 state:resolved]" This reverts commit 3a875e618487a06a56f6cf912cf5440f294921cc.
* Changed behavior of touch and added touch! Originally implemented by Obie ↵Nathaniel Bibler2010-03-271-0/+25
| | | | | Fernandez, updated touch! to act as a thin wrapper to touch. [#2520 state:resolved] Signed-off-by: wycats <wycats@gmail.com>
* In PostgreSQLAdapter, switch tables query to use current_schemas function ↵Kris Selden2010-03-261-0/+9
| | | | | | [#918 state:resolved] Signed-off-by: wycats <wycats@gmail.com>
* Add add_limit_offset! to adapters.Emilio Tagua2010-03-251-0/+21
|
* expand migration paths before requiring them. [#4240 state:resolved]Aaron Patterson2010-03-231-0/+13
| | | | Signed-off-by: wycats <wycats@gmail.com>