aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
Commit message (Collapse)AuthorAgeFilesLines
* Nested subclasses are not prefixed with the parent class' table_name since ↵Jeremy Kemper2006-08-251-7/+16
| | | | | | they should always use the base class' table_name. Closes #5911. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4819 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLServer: work around bug where some unambiguous date formats are not ↵Jeremy Kemper2006-08-251-1/+2
| | | | | | correctly identified if the session language is set to german. Closes #5894. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4816 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Clashing type columns due to a sloppy join shouldn't wreck single-table ↵Jeremy Kemper2006-08-241-11/+22
| | | | | | inheritance. Closes #5838. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4813 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures: correct escaping of \n and \r. Closes #5859.Jeremy Kemper2006-08-241-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Migrations: gracefully handle missing migration files. Closes #5857.Jeremy Kemper2006-08-231-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4809 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rollback #5819 since it's compatible with PostgreSQL 8.1 only. References #5819.Jeremy Kemper2006-08-221-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4806 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* to_xml: correct naming of included associations. Closes #5831.Jeremy Kemper2006-08-201-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4794 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pushing a record onto a has_many :through sets the association's foreign key ↵Jeremy Kemper2006-08-201-1/+2
| | | | | | to the associate's primary key and adds it to the correct association. Closes #5829. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4792 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* unbraindeadify addition to has_many :throughJeremy Kemper2006-08-193-9/+17
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4791 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pushing a record onto a has_many :through sets the association's foreign key ↵Jeremy Kemper2006-08-191-5/+13
| | | | | | to the associate's primary key. Closes #5815. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* whitespaceJeremy Kemper2006-08-191-2/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4789 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: simplify index introspection query. Closes #5819.Jeremy Kemper2006-08-191-5/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4788 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add records to has_many :through using <<, push, and concat by creating the ↵Jeremy Kemper2006-08-182-29/+75
| | | | | | association record. Raise if base or associate are new records since both ids are required to create the association. #build raises since you can't associate an unsaved record. #create! takes an attributes hash and creates the associated record and its association in a transaction. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4786 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Cache nil results for :included has_one associations also. Closes #5787.Jeremy Kemper2006-08-171-3/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4783 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Included associations: go deep.Jeremy Kemper2006-08-161-13/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4776 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed a bug which would cause .save to fail after trying to access a empty ↵Tobias Lütke2006-08-161-10/+9
| | | | | | has_one association on a unsaved record. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Nested classes are given table names prefixed by the singular form of the ↵Jeremy Kemper2006-08-161-6/+20
| | | | | | parent's table name. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4770 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make indexed columns easy to extract from the index name. Oracle users ↵Jeremy Kemper2006-08-151-1/+1
| | | | | | should explicitly assign index names due to field length restrictions. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4768 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Migrations: uniquely name multicolumn indexes so you don't have to.Jeremy Kemper2006-08-151-10/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4767 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix for deep includes on the same association.Jeremy Kemper2006-08-141-2/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4758 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use require_dependency and not require to load modelsNicholas Seckar2006-08-121-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4753 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Tweak fixtures so they don't try to use a non-ActiveRecord class. [Kevin Clark]Rick Olson2006-08-111-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4752 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove ActiveRecord::Base.reset since Dispatcher doesn't use it anymore. ↵Rick Olson2006-08-092-13/+1
| | | | | | [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4743 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document find's :from option. Closes #5762. [andrew@redlinesoftware.com]Marcel Molina2006-08-091-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4739 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: autodetected sequences work correctly with multiple schemas. ↵Jeremy Kemper2006-08-091-2/+3
| | | | | | Rely on the schema search_path instead of explicitly qualifying the sequence name with its schema. Closes #5280. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4737 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* New dependencies implementationNicholas Seckar2006-08-082-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4728 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Cache nil results for has_one associations so multiple calls don't call the ↵Rick Olson2006-08-082-7/+7
| | | | | | database. Closes #5757. [Michael A. Schoen] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4721 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add documentation for how to disable timestamps on a per model basis. Closes ↵Marcel Molina2006-08-071-0/+9
| | | | | | #5684. [matt@mattmargolis.net Marcel Molina Jr.] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4706 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't save has_one associations unnecessarily. Closes #5735.Jeremy Kemper2006-08-061-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4690 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor ActiveRecord::Base.reset_subclasses to #reset, and add global ↵Rick Olson2006-08-062-2/+20
| | | | | | observer resetting. [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4683 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Formally deprecate the deprecated finders. [Koz]Michael Koziarski2006-08-051-0/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4682 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Formally deprecate rich associations. [Koz]Michael Koziarski2006-08-051-1/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4680 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactored select routing for SQL Server adapter (closes #5683) [tom@popdog.net]David Heinemeier Hansson2006-08-051-11/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4671 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that default timezones for new / initialize should uphold utc setting ↵David Heinemeier Hansson2006-08-051-1/+1
| | | | | | (closes #5709) [daniluk@yahoo.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4670 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix announcement of very long migration names. Closes #5722.Jeremy Kemper2006-08-051-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4663 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* The exists? class method should treat a string argument as an id rather than ↵Jeremy Kemper2006-08-031-3/+15
| | | | | | as conditions. Closes #5698. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4655 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed to_xml with :include misbehaviors when invoked on array of model ↵David Heinemeier Hansson2006-08-031-0/+2
| | | | | | instances (closes #5690) [alexkwolfe@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4652 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for conditions on Base.exists? (closes #5689) [josh@joshpeek.com]David Heinemeier Hansson2006-08-031-2/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4651 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Schema dumper quotes date :default values.Jeremy Kemper2006-08-021-1/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4650 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4889@ks: jeremy | 2006-07-31 20:27:15 -0700Jeremy Kemper2006-08-011-6/+6
| | | | | | | Create and update return the new pk and the number of affected rows, respectively. The job of returning true to appease the validations chain is up to create_or_update. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4645 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Calculate sum with SQL, not Enumerable on HasManyThrough Associations. [Dan ↵Rick Olson2006-07-311-1/+6
| | | | | | Peterson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4640 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4880@ks: jeremy | 2006-07-30 23:52:59 -0700Jeremy Kemper2006-07-311-1/+2
| | | | | | | | | Only set method_name = md.pre_match if the pre_match is an attribute. Plays nicely with other ? suffixed attribute methods. r4881@ks: jeremy | 2006-07-30 23:53:37 -0700 Heavier testing for attribute method suffixes. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4635 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4854@ks: jeremy | 2006-07-30 00:59:18 -0700Jeremy Kemper2006-07-313-9/+82
| | | | | | | | | | | Attribute methods r4877@ks: jeremy | 2006-07-30 20:23:53 -0700 Factor the attribute#{suffix} methods out of method_missing for easier extension. r4878@ks: jeremy | 2006-07-30 20:42:23 -0700 More specific method naming, declare many attribute method suffixes, set up default suffixes at module include rather than lazily. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4632 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Patch sql injection vulnerability when using integer or float columns.Jamis Buck2006-07-271-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4626 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow #count through a has_many association to accept :include. [Dan Peterson]Rick Olson2006-07-242-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4618 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix association exception messages, fix them so the error messages actually ↵Rick Olson2006-07-203-41/+16
| | | | | | display git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4615 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* create_table rdoc: suggest :id => false for habtm join tablesJeremy Kemper2006-07-101-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4606 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: return array fields as strings. Closes #4664.Jeremy Kemper2006-07-101-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4605 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* occured -> occurred. Closes #5559.Jeremy Kemper2006-07-102-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4604 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ignore fixtures in test cases if there are no database configurations. ↵Jeremy Kemper2006-07-101-2/+2
| | | | | | References #5497. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4603 5ecf4fe2-1ee6-0310-87b1-e25e094e27de