aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
* 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-2412-33/+208
| | | | 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-223-6/+24
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9075 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix schema.rb some more. sponsors.sponsorable_type should be a string. ↵Jeremy Kemper2008-03-211-1/+1
| | | | | | References #4756. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9073 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix schema.rb. Please to be testing on more than just MySQL! References #9067.Jeremy Kemper2008-03-211-24/+24
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9072 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow association scoping for built/created records if :conditions is ↵Rick Olson2008-03-212-0/+27
| | | | | | 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-2111-2/+145
| | | | 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-072-1/+7
| | | | 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-022-0/+23
| | | | | | 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-282-1/+30
| | | | | | 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-272-2/+11
| | | | 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-223-4/+8
| | | | | | 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-202-64/+57
| | | | | | 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
* Cleanup whitespace and remove keys instead of providing nilMichael Koziarski2008-02-201-2/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8907 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove reference to 'postgres' user in the connection and Rakefiles. Allows ↵Michael Koziarski2008-02-201-2/+2
| | | | | | postgres permissions to fallback to host / ident based auth. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8906 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-184-1/+13
| | | | | | 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-134-3/+27
| | | | | | association cannot be saved. Closes #11084. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8864 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove options from the attributes method, tidy up the implementation. ↵Michael Koziarski2008-02-131-17/+0
| | | | | | Closes #11093 [juanjo.bazan, Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8863 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix the pre-quoted table names in the eager tests. [mislav]Michael Koziarski2008-02-111-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8857 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix eager loading with pre-quoted table names. Closes #11046 ↵Michael Koziarski2008-02-111-0/+24
| | | | | | [danielmorrison, Koz, Jeremy Kemper] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8856 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Multiparameter attributes for time columns fail over to DateTime when out of ↵Geoff Buesing2008-02-101-0/+11
| | | | | | range of Time git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8855 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add uses_tzinfo to active record tests to prevent breaking the cc.rb build ↵Michael Koziarski2008-02-063-58/+70
| | | | | | etc. Closes #11034 [mpalmer] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8808 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Time Zone support to ActiveRecord, and config.time_zone property for ↵Rick Olson2008-02-062-2/+111
| | | | | | specifying a default Time Zone. Closes #10982 [Geoff Buesing, rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8806 5ecf4fe2-1ee6-0310-87b1-e25e094e27de