aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
Commit message (Collapse)AuthorAgeFilesLines
* Dirty typecasts attribute values before comparison, if possible. Closes ↵Jeremy Kemper2008-03-291-62/+59
| | | | | | #11464 [Russell Norris, mroch] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9139 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that validates_size_of :within works in associations (closes #11295, ↵David Heinemeier Hansson2008-03-291-0/+14
| | | | | | #10019) [cavalle] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9129 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Track changes to unsaved attributesJeremy Kemper2008-03-291-0/+80
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9127 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Switched to UTC-timebased version numbers for migrations and the schema. ↵David Heinemeier Hansson2008-03-281-11/+32
| | | | | | This will as good as eliminate the problem of multiple migrations getting the same version assigned in different branches. Also added rake db:migrate:up/down to apply individual migrations that may need to be run when you merge branches (closes #11458) [jbarnette] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9122 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix some mistaken dependencies among AR unit tests. Closes #11425 ↵Jeremy Kemper2008-03-282-3/+3
| | | | | | [thechrisoshow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9118 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that has_many :through would ignore the hash conditions (closes ↵David Heinemeier Hansson2008-03-281-0/+5
| | | | | | #11447) [miloops] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9110 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure ActiveRecord tests can run individually. Closes #11425 ↵Pratik Naik2008-03-284-3/+18
| | | | | | [thechrisoshow, h-lame] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9109 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix issue where the :uniq option of a has_many :through association is ↵Rick Olson2008-03-261-0/+8
| | | | | | ignored when find(:all) is called. Closes #9407 [cavalle] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9096 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix duplicate table alias error when including an association with a ↵Rick Olson2008-03-261-1/+6
| | | | | | has_many :through association on the same join table. Closes #7310 [cavalle] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9095 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that ActiveRecord#Base.find_or_create/initialize would not honor ↵David Heinemeier Hansson2008-03-251-0/+32
| | | | | | attr_protected/accessible when used with a hash (closes #11422) [miloops] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9090 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added ActiveRecord#Base.all/first/last as aliases for ↵David Heinemeier Hansson2008-03-242-0/+12
| | | | | | find(:all/:first/:last) (closes #11413) [nkallen, thechrisoshow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9085 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Merge the has_finder gem, renamed as 'named_scope'. Closes #11404 [nkallen]Rick Olson2008-03-247-31/+152
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix merging blank conditions. Closes #10764 [mcmire, cavalle]Jeremy Kemper2008-03-231-2/+22
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9082 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* has_one :through supports :source_type. Fix up some tests. References #4756.Jeremy Kemper2008-03-221-4/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9075 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow association scoping for built/created records if :conditions is ↵Rick Olson2008-03-211-0/+24
| | | | | | specified as a hash. Closes #11393 [miloops] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9068 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add has_one :through support, finally. Closes #4756 [thechrisoshow]Rick Olson2008-03-212-2/+63
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9067 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Migrations: create_table supports primary_key_prefix_type. Closes #10314.Jeremy Kemper2008-03-181-0/+27
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9056 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added logging for dependency load errors with fixtures (closes #11056) ↵David Heinemeier Hansson2008-03-171-0/+14
| | | | | | [stuthulhu] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9050 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Time, DateTime and TimeWithZone #in_time_zone defaults to Time.zone. ↵Geoff Buesing2008-03-171-1/+1
| | | | | | Removing now unneeded #in_current_time_zone. ActiveRecord time zone aware attributes updated to use #in_time_zone git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9047 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that you can still do expressions in calculations (closes #11355) ↵David Heinemeier Hansson2008-03-171-0/+4
| | | | | | [nbugajski/cavelle] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9043 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that scoped joins would not always be respected (closes #6821) ↵David Heinemeier Hansson2008-03-131-0/+8
| | | | | | [Theory/Danger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that ActiveRecord::Calculations disambiguates field names with the ↵Rick Olson2008-03-131-0/+8
| | | | | | table name. Closes #11027 [cavalle] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9018 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added add/remove_timestamps to the schema statements for adding the ↵David Heinemeier Hansson2008-03-131-0/+40
| | | | | | created_at/updated_at columns on existing tables (closes #11129) [jramirez] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9014 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added ActiveRecord::Base.find(:last) (closes #11338) [miloops]David Heinemeier Hansson2008-03-121-0/+27
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9012 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* test_native_types expects DateTime.local_offset instead of ↵Geoff Buesing2008-03-101-1/+1
| | | | | | DateTime.now.offset; fixes test breakage due to dst transition git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9003 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add :readonly option to HasManyThrough associations. Closes #11156 [miloops]Pratik Naik2008-03-071-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8989 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make the schema dumper respect the schema settings in database.yml. ↵Michael Koziarski2008-03-031-0/+38
| | | | | | References #8659 [sveiss] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8979 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make the mysql schema dumper roundtrip the limits of text/blob columns. ↵Michael Koziarski2008-03-021-0/+12
| | | | | | Closes #7424 [will.bryant] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8969 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve performance by avoiding named block arguments. Closes #11109 [adymo]Michael Koziarski2008-02-291-0/+5
| | | | | | | Reapplies [8865] with some fixes git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8957 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Provide a post title for sqlite3Jeremy Kemper2008-02-281-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8943 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix that batched :include would pull in duplicate records in some cases. ↵Jeremy Kemper2008-02-281-0/+26
| | | | | | Closes #11215 [Catfish] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8942 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* mark encodingJeremy Kemper2008-02-281-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8941 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix edge case with colons in times interpreted as bind variables by ↵Jeremy Kemper2008-02-271-0/+2
| | | | | | requiring that bind vars start with a letter. Closes #10519 [matrix9180] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8936 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix preloading nil polymorphic belongs_to. Closes #11218 [matrix9180]Jeremy Kemper2008-02-271-1/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8933 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove dead code from hmt#delete. Closes #11236 [rubyruy]Jeremy Kemper2008-02-271-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8932 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: support server versions 7.4 through 8.0 and the ruby-pg driver. ↵Jeremy Kemper2008-02-222-3/+5
| | | | | | Closes #11127 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8922 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move the eager load nested include tables into schema.rb and use delete_all ↵Michael Koziarski2008-02-201-64/+38
| | | | | | instead of drop table to reset the state. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8914 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Revert to previous mysql-specific assertion, and only run the test on mysql.Michael Koziarski2008-02-201-3/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8913 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* remove implicit assumption about mysql in the assertionMichael Koziarski2008-02-201-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8912 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove disconnect! in test case, it causes segfaults on sqlite3 and ↵Michael Koziarski2008-02-201-6/+2
| | | | | | completely destroys postgresql git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8908 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Correct typo in before_type_cast code. Closes #11165 [amishyn]Michael Koziarski2008-02-191-1/+17
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove mysql option from a test that applies to all databases. References ↵Jeremy Kemper2008-02-191-5/+4
| | | | | | #11154. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't assume all records from nested include are of same class. Closes ↵Jeremy Kemper2008-02-191-0/+114
| | | | | | #11154 [acechase] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8896 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure nested preloading works when associations return nil. Closes #11145 ↵Michael Koziarski2008-02-181-0/+6
| | | | | | [GMFlash] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8894 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make dynamic finders respect the :include on HasManyThrough associations. ↵Michael Koziarski2008-02-181-0/+6
| | | | | | Closes #10998. [cpytel] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8890 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix observed_class. References #11099.Jeremy Kemper2008-02-171-6/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* ActiveRecord::Base#instantiate_time_object only uses Time.zone when ↵Geoff Buesing2008-02-161-0/+15
| | | | | | Base.time_zone_aware_attributes is true; leverages Time#time_with_datetime_fallback for readability git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8882 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add test for Observer#observer_class and change the implementation slightly. ↵Michael Koziarski2008-02-151-0/+4
| | | | | | Closes #11099 [ernesto.jimenez] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8875 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix typo in migration test. Closes #11105 [h-lame]Jeremy Kemper2008-02-151-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8873 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce the :readonly option to all associations. Records from the ↵Jeremy Kemper2008-02-132-3/+23
| | | | | | association cannot be saved. Closes #11084. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8864 5ecf4fe2-1ee6-0310-87b1-e25e094e27de