aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* eval with __FILE__ and __LINE__Jeremy Kemper2007-10-102-6/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* find_and_(initialize|create)_by methods can now properly initialize ↵Tobias Lütke2007-10-104-7/+35
| | | | | | protected attributes git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7826 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that 'autosaving' works when associations aren't loaded [Bryan ↵Michael Koziarski2007-10-104-6/+28
| | | | | | Helmkamp] References #8713 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7824 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update :dependent docs and improve its argument error message.Jeremy Kemper2007-10-091-34/+32
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7813 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* belongs_to infers the foreign key from the association name instead of from ↵Jeremy Kemper2007-10-082-1/+3
| | | | | | the class name. Fulfills the 1.2.4 deprecation. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7812 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure AR::Base#clone handles attr changes made in after_initialize ↵Michael Koziarski2007-10-083-4/+14
| | | | | | hooks. Closes #7191 [weyus] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7802 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: support multiline default values. Closes #7533.Jeremy Kemper2007-10-084-15/+24
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7801 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dr Math meets Captain Obvious.Jeremy Kemper2007-10-081-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7798 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Namespace the internal Rakefile tasks. Closes #8850 [drnic]Jeremy Kemper2007-10-081-63/+87
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7795 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: fix change_column on not-null columns that don't accept dfeault ↵Jeremy Kemper2007-10-083-2/+14
| | | | | | values of ''. Closes #6663. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change Migration documentation to use the new syntax. Closes #9813 [sjgman9]Michael Koziarski2007-10-081-5/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7788 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* validates_uniqueness_of behaves well with single-table inheritance. Closes ↵Jeremy Kemper2007-10-083-2/+34
| | | | | | #3833. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7787 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use fast date/time parsing by default. Closes #9811.Jeremy Kemper2007-10-073-35/+34
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7780 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Closed wrong ticket. Closes #9802, reopens #9699.Jeremy Kemper2007-10-071-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7778 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Raise ProtectedAttributeAssignmentError in development and test environments ↵Jeremy Kemper2007-10-073-14/+54
| | | | | | when mass-assigning to an attr_protected attribute. Closes #9699. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7777 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Reinstate failsafe date/time parsing rescues. Head off some obvious failures ↵Jeremy Kemper2007-10-072-22/+29
| | | | | | like year == 0 or nil. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7771 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: speedup date/time parsing.Jeremy Kemper2007-10-073-58/+96
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7769 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Check for the dir instead of relying on an exception.Jeremy Kemper2007-10-071-5/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7768 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix calling .clear on a has_many :dependent=>:delete_all association. ↵Michael Koziarski2007-10-073-2/+5
| | | | | | [tarmo] Closes #6904 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7767 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow change_column to set NOT NULL in the PostgreSQL adaptor. Closes #3904 ↵Michael Koziarski2007-10-073-18/+29
| | | | | | [tarmo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7766 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move misplaced CHANGELOG entryJeremy Kemper2007-10-061-2/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7755 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Missed the addMichael Koziarski2007-10-062-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7754 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Send the correct INSERT statement when dealing with objects with only ↵Michael Koziarski2007-10-0622-8/+94
| | | | | | primary keys. Closes #9523 [tarmo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7753 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Only cache attributes which need it for performance reasons. Closes #9767 ↵Michael Koziarski2007-10-062-1/+75
| | | | | | [skaes] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7752 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Test for each JSON fragment to workaround assumed hash ordering.Jeremy Kemper2007-10-061-1/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7751 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Simplify some JSON testsJeremy Kemper2007-10-061-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7750 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix that ActiveRecord would create attribute methods and override custom ↵Rick Olson2007-10-064-15/+54
| | | | | | attribute getters if the method is also defined in Kernel.methods. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7749 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't call attr_readonly on polymorphic belongs_to associations, in case it ↵Rick Olson2007-10-053-1/+7
| | | | | | matches the name of some other non-ActiveRecord class/module. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7748 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Bump versions for 1.2.4 release.Jeremy Kemper2007-10-052-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7744 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#to_json takes :only or :except options to specific or omit certain hash ↵Jeremy Kemper2007-10-042-2/+36
| | | | | | keys. Enumerable#to_json passes through its options to each element. Closes #9751. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7736 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Try loading activerecord-<adaptername>-adapter gem before trying a plain ↵Jeremy Kemper2007-10-042-8/+8
| | | | | | require so you can use custom gems for the bundled adapters. Also stops gems from requiring an adapter from an old Active Record gem. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7735 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* only create custom accessors for Kernel:: methodsTobias Lütke2007-10-031-11/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7731 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow column accessors to be created even if Kernel. or Object# methods of ↵Tobias Lütke2007-10-031-4/+15
| | | | | | the same name exist. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7729 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Cache the descends_from_activerecord? call to speed up query generation. ↵Michael Koziarski2007-10-031-3/+8
| | | | | | [skaes] Closes #9765 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7723 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat, consistent load pathsJeremy Kemper2007-10-021-3/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed JSON encoding to use quoted keys according to the JSON standard ↵David Heinemeier Hansson2007-09-301-5/+0
| | | | | | (closes #8762) [choonkat/chuyeow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add attr_readonly to specify columns that are skipped during a normal ↵Rick Olson2007-09-305-17/+85
| | | | | | ActiveRecord #save operation. Closes #6896 [dcmanges] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7693 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make size for has_many :through use counter cache if it exists. Closes ↵Rick Olson2007-09-303-1/+22
| | | | | | #9734 [xaviershay] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7692 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't implicitly assign instance variables by using them as block argumentsJeremy Kemper2007-09-301-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7691 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove DB2 adapter since IBM chooses to maintain their own adapter instead.Jeremy Kemper2007-09-292-242/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7690 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Extract Oracle, SQLServer, and Sybase adapters into gems.Jeremy Kemper2007-09-294-2007/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7689 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat for instance method check in Mysql adapter.Jeremy Kemper2007-09-291-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7688 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Updated CHANGELOGs. They need to be filtered for duplicatesDavid Heinemeier Hansson2007-09-291-1/+1973
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7685 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Failing counter cache test. References #6896.Jeremy Kemper2007-09-281-0/+18
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7675 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Missing testDavid Heinemeier Hansson2007-09-281-0/+148
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7674 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures test fixes and general cleanup. Closes #9682 [norbert]Jeremy Kemper2007-09-283-130/+113
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7667 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed spelling errors (closes #9706) [tarmo/rmm5t]David Heinemeier Hansson2007-09-2817-24/+24
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7666 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: change_column raises if the table or column doesn't exist.Jeremy Kemper2007-09-281-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7665 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :include option to to_json (closes #9677) [chuyeow]David Heinemeier Hansson2007-09-283-63/+84
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7663 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added fixture caching thatll speed up a normal fixture-powered test suite ↵David Heinemeier Hansson2007-09-284-15/+90
| | | | | | between 50% and 100% (closes #9682) [frederick.cheung@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7662 5ecf4fe2-1ee6-0310-87b1-e25e094e27de