aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/reflection.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge docrails:Pratik Naik2008-05-091-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit e6afd8b2736364322b673bbdcca3e9b38b6d3da0 Author: Xavier Noria <fxn@hashref.com> Date: Thu May 8 23:49:36 2008 +0200 Overall documentation improvement and markup corrections. Zillion changes. commit 2fead68b3192332eee27945ed95a94a64ca73f70 Author: Austin Putman <austin@emmanuel.local> Date: Wed May 7 19:35:46 2008 -0700 Documented class methods on ActionController::Routing. These are dangerous, and mostly used for testing. commit f5b84182dbc39bea79c8ee319c688d00fa99f9d1 Author: Teflon Ted <github@rudiment.net> Date: Wed May 7 16:08:49 2008 -0400 Added explanation about errant inflections not being patched in the future in order to avoid breaking legacy applications. commit 370f4f51722cec49ace17093d29e9ce9e8f15cfb Author: Sunny Ripert <negatif@gmail.com> Date: Wed May 7 14:00:59 2008 +0200 Applied list conventions in AR::Base commit 5bd18429f09d44e75191bec42a6db04bd33f3030 Author: Sunny Ripert <negatif@gmail.com> Date: Wed May 7 13:53:35 2008 +0200 Renamed Options list to Attributes list whenever they weren't option hashes in AR::Base commit d912bd5672316454457ae83f6e9dda5197beeb6f Author: Yaroslav Markin <yaroslav@markin.net> Date: Wed May 7 13:50:28 2008 +0400 Add a filter_parameter_logging usage hint to generated ApplicationController. This may help to remind the developer to filter sensitive information from application logs. Closes #11578 commit b243de0db3c2605121e055079854af5090d06374 Author: Jack Danger Canty <git@6brand.com> Date: Tue May 6 23:39:47 2008 -0700 doc: disambiguating an example ActiveRecord class commit f81d771f0657ae8375b84a77a059812cce5d6fd9 Author: Jack Danger Canty <git@6brand.com> Date: Tue May 6 23:35:05 2008 -0700 doc: ActiveRecord::Reflection::AssociationReflection#through_reflection Added documentation demonstrating the use of #through_reflection for finding intervening reflection objects for HasManyThrough and HasOneThrough. commit ae6b46f00b5b8b2939c6b37ce3329c83de7e71db Author: Cheah Chu Yeow <chuyeow@gmail.com> Date: Wed May 7 13:47:41 2008 +0800 Document AttributeAssignmentError and MultiparameterAssignmentErrors. commit 8f463550b597db2156b67733f31aed13487fbc3a Author: John Barnette <jbarnette@gmail.com> Date: Tue May 6 22:46:44 2008 -0700 Killing/fixing a bunch of outdated language in the AR README. commit aca44bcd92ef783abdf484b58abdde6786db0f89 Author: Cheah Chu Yeow <chuyeow@gmail.com> Date: Wed May 7 13:34:52 2008 +0800 Make a note about ActiveResource::Timeouterror being raised when ARes calls timeout. commit 284a930a93fbee16e25d06392779dbf2f03e9e12 Author: Jonathan Dance <jd@wuputah.com> Date: Tue May 6 14:58:26 2008 -0400 improvements to the page caching docs commit 9482da621390c874da7c921c8bd6230caae7035a Author: Sunny Ripert <negatif@gmail.com> Date: Mon May 5 18:13:40 2008 +0200 validates_numericality_of() "integer" option really is "only_integer" commit e9afd6790a8f530528f6597a7f59bb283be754f6 Author: Sunny Ripert <negatif@gmail.com> Date: Mon May 5 12:11:59 2008 +0200 Harmonized hash notation in AR::Base commit 67ebf14a91ffd970b582be4ff2991d691a9cf3e1 Author: Sunny Ripert <negatif@gmail.com> Date: Mon May 5 12:06:19 2008 +0200 Turned options into rdoc-lists in AR::Base commit 0ec7c0a41d889d4e5382b9dff72f1aaba89bf297 Author: Marshall Huss <mwhuss@Macbook.local> Date: Sun May 4 23:21:33 2008 -0400 Added information of how to set element_name in the case the user has a name confliction with an existing model Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Improve documentation coverage and markupXavier Noria2008-05-021-8/+7
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Improve documentation.Pratik Naik2008-04-051-8/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* More thoroughly quote table names. Exposes some issues with sqlite2 adapter. ↵Jeremy Kemper2008-01-051-0/+4
| | | | | | Closes #10698. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Docfix (closes #10252)David Heinemeier Hansson2007-11-251-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8207 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Smattering of grammatical fixes to documentation. Closes #10083 [BobSilva]Marcel Molina2007-11-081-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8113 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change belongs_to so that the foreign_key assumption is taken from the ↵Rick Olson2007-07-161-1/+1
| | | | | | association name, not the class name. Closes #8992 [hasmanyjosh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow a polymorphic :source for has_many :through associations. Closes ↵Rick Olson2007-03-131-2/+6
| | | | | | #7143 [protocool] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6408 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Aggregate reflection klass works with nested :class_nameJeremy Kemper2007-01-141-35/+32
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5923 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* [DOCS] Apply more documentation for ActiveRecord Reflection. Closes #4055 ↵Rick Olson2007-01-051-5/+19
| | | | | | [Robby Russell] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5855 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix association exception messages, fix them so the error messages actually ↵Rick Olson2006-07-201-2/+2
| | | | | | display git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4615 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Reflect on aggregation ignores :class_name option (fixes #4599) [lars pind]David Heinemeier Hansson2006-04-061-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4175 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added descriptive error messages for invalid has_many :through associations: ↵Rick Olson2006-04-051-0/+4
| | | | | | | | | going through :has_one or :has_and_belongs_to_many [Rick] Added support for going through a polymorphic has_many association: (closes #4401) [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4169 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* pass the correct reflection to HasManyThroughAssociationPolymorphicErrorRick Olson2006-03-301-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4106 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change has_many :through to use the :source option to specify the source ↵Rick Olson2006-03-241-6/+3
| | | | | | association. :class_name is now ignored. [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow has_many :through associations to find the source association by ↵Rick Olson2006-03-191-7/+12
| | | | | | setting a custom class (closes #4307) [jonathan@bluewire.net.nz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3973 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow has_many :through to work on has_many associations (closes #3864) ↵Rick Olson2006-03-191-2/+4
| | | | | | [sco@scottraymond.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3964 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Raise error when trying to select many polymorphic objects with has_many ↵Rick Olson2006-03-191-0/+31
| | | | | | :through or :include (closes #4226) [josh@hasmanythrough.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3961 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix that has_many :through honors the foreign key set by the belongs_to ↵Rick Olson2006-03-181-0/+6
| | | | | | association in the join model (closes #4259) [andylien@gmail.com / Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3954 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow :dependent options to be used with polymorphic joins. #3820 [Rick Olson]Rick Olson2006-03-161-3/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3881 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make counter cache work when replacing an association (closes #3245). Thanks ↵Jamis Buck2006-03-041-0/+8
| | | | | | for the patch! git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3762 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add more documentation for Reflection. [robby@planetargon.com]. Closes #4001Michael Koziarski2006-02-281-1/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3705 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dont require association classes before theyre supposed to be used (closes ↵David Heinemeier Hansson2006-02-271-4/+0
| | | | | | #3976) [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that reflections would bleed across class boundaries in single-table ↵David Heinemeier Hansson2006-02-251-2/+4
| | | | | | inheritance setups (closes #3796) [lars@pind.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3650 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Reflections don't attempt to resolve module nesting of association classes. ↵Jeremy Kemper2006-02-221-3/+2
| | | | | | Simplify type computation. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3637 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added option to Base.reflection_of_all_associations to specify a specific ↵David Heinemeier Hansson2005-12-271-3/+5
| | | | | | association to scope the call. For example Base.reflection_of_all_associations(:has_many) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3357 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added preliminary support for join models [DHH] Added preliminary support ↵David Heinemeier Hansson2005-12-031-38/+48
| | | | | | for polymorphic associations [DHH] Refactored associations to use reflections to get DRYer, beware, major refactoring -- double check before deploying anything with this (all tests pass, but..) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3213 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made association extensions use simpler block syntaxDavid Heinemeier Hansson2005-11-061-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2895 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix docs (closes #2491)David Heinemeier Hansson2005-10-261-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2744 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2979@asus: jeremy | 2005-07-10 01:51:00 -0700Jeremy Kemper2005-07-101-30/+32
| | | | | | | | | | | | | Split association reflection test into has_many and has_one tests. TODO: extend to belongs_to and habtm as well. Kill trailing whitespace. r2980@asus: jeremy | 2005-07-10 01:53:41 -0700 Test that eager load of firm.account (a has_one) returns the correct account. This doesn't cover the regression in Ticket #1688, however. Need a case where class name is not provided and the singular name is over-singularized by active_record.class_name. Kill trailing whitespace. r2981@asus: jeremy | 2005-07-10 01:56:44 -0700 Fix class name resolution in AssociationReflection#name_to_class_name. Use the equivalent of the idiomatic ||= (read or write if nil) for the class_inheritable_attribute reflection arrays. Kill trailing whitespace. r2982@asus: jeremy | 2005-07-10 01:59:08 -0700 Remove superfluous assignment in compute_type. In an inject, the return value is used for the next injection, so assigning to the injected value is unnecessary. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Speeded up eager loading a whole bunchDavid Heinemeier Hansson2005-04-181-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1212 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added MacroReflection#macro which will return a symbol describing the macro ↵David Heinemeier Hansson2005-02-271-4/+10
| | | | | | used (like :composed_of or :has_many) #718, #248 [james@slashetc.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@805 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* InitialDavid Heinemeier Hansson2004-11-241-0/+126
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4 5ecf4fe2-1ee6-0310-87b1-e25e094e27de