aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* Fixed that validates_size_of :within works in associations (closes #11295, ↵David Heinemeier Hansson2008-03-293-7/+21
| | | | | | #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-294-0/+201
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9127 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix new migration versionsDavid Heinemeier Hansson2008-03-281-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9126 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Switched to UTC-timebased version numbers for migrations and the schema. ↵David Heinemeier Hansson2008-03-285-77/+134
| | | | | | 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-284-2/+26
| | | | | | #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-285-4/+19
| | | | | | [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-263-5/+13
| | | | | | 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-263-26/+35
| | | | | | 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
* More efficient association preloading code that compacts a through_records ↵Rick Olson2008-03-262-8/+13
| | | | | | array in a central location. Closes #11427 [danger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9094 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve documentation.Pratik Naik2008-03-266-48/+84
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9093 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Typo fix in documentation from [9090] References #11422Michael Koziarski2008-03-261-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9092 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that ActiveRecord#Base.find_or_create/initialize would not honor ↵David Heinemeier Hansson2008-03-253-4/+46
| | | | | | 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-244-2/+28
| | | | | | 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-2420-39/+369
| | | | 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-232-10/+43
| | | | 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-225-9/+32
| | | | 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-214-3/+36
| | | | | | 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-2115-22/+245
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9067 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Docfixes (closes #11356, #11172, #10523)David Heinemeier Hansson2008-03-201-0/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9064 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Migrations: create_table supports primary_key_prefix_type. Closes #10314.Jeremy Kemper2008-03-184-4/+38
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9056 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor filters to use Active Support callbacks. Closes #11235.Jeremy Kemper2008-03-181-8/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9055 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* sshpublisher needs to be explicitly required now, apparentlyDavid Heinemeier Hansson2008-03-181-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9054 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Only log if theres a loggerDavid Heinemeier Hansson2008-03-171-1/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added logging for dependency load errors with fixtures (closes #11056) ↵David Heinemeier Hansson2008-03-173-5/+27
| | | | | | [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-173-3/+5
| | | | | | 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-172-1/+6
| | | | | | [nbugajski/cavelle] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9043 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Docfix (closes #11309) [thechrisoshow]David Heinemeier Hansson2008-03-131-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9023 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that scoped joins would not always be respected (closes #6821) ↵David Heinemeier Hansson2008-03-133-7/+18
| | | | | | [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-133-0/+11
| | | | | | 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-133-0/+58
| | | | | | 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-123-1/+67
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9012 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add warning in documentation for increment!, decrement! and toggle! methods. ↵Pratik Naik2008-03-111-0/+3
| | | | | | Closes #11098 [DefV] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9011 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* test_native_types expects DateTime.local_offset instead of ↵Geoff Buesing2008-03-102-1/+3
| | | | | | 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-074-2/+13
| | | | 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-032-3/+43
| | | | | | References #8659 [sveiss] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8979 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve performance on :include/:conditions/:limit queries by selectively ↵Michael Koziarski2008-03-032-10/+29
| | | | | | joining in the pre-query. Closes #9560 [dasil003] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8977 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make the mysql schema dumper roundtrip the limits of text/blob columns. ↵Michael Koziarski2008-03-023-0/+40
| | | | | | 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-295-18/+65
| | | | | | | 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-284-4/+35
| | | | | | 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-272-1/+3
| | | | | | 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-273-7/+17
| | | | 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-272-1/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8932 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix rdoc typo. Closes #11205 [wangchun]Jeremy Kemper2008-02-241-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8927 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: support server versions 7.4 through 8.0 and the ruby-pg driver. ↵Jeremy Kemper2008-02-225-24/+80
| | | | | | 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