aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/reflection.rb
Commit message (Collapse)AuthorAgeFilesLines
* DRY up the code which instantiates the association proxyJon Leighton2011-01-111-0/+25
|
* Implement deprecated version of AssociationReflection#primary_key_name, ↵Jon Leighton2011-01-031-0/+6
| | | | which has been renamed to #foreign_key. Also bumping the deprecation_horizon in Active Support to 3.1.
* Have a proper AssociationReflection#foreign_type method rather than using ↵Jon Leighton2011-01-031-0/+4
| | | | options[:foreign_type]
* Rename AssociationReflection#primary_key_name to foreign_key, since the ↵Jon Leighton2010-12-311-7/+7
| | | | options key which it relates to is :foreign_key
* Now we can drop-kick AssociationReflection#dependent_conditions into oblivion.Jon Leighton2010-12-311-11/+0
|
* Raise an error for associations which try to go :through a polymorphic ↵Jon Leighton2010-12-231-1/+5
| | | | association [#6212 state:resolved]
* Improved strategy for updating a belongs_to association when the foreign key ↵Jon Leighton2010-12-231-1/+4
| | | | changes. Rather than resetting each affected association when the foreign key changes, we should lazily check for 'staleness' (where fk does not match target id) when the association is accessed.
* Don't allow a has_one association to go :through a collection association ↵Jon Leighton2010-12-231-0/+4
| | | | [#2976 state:resolved]
* Fix problem where wrong keys are used in JoinAssociation when an association ↵Jon Leighton2010-12-201-0/+4
| | | | goes :through a belongs_to [#2801 state:resolved]
* Fix various issues with the :primary_key option in :through associations ↵Jon Leighton2010-12-151-1/+5
| | | | [#2421 state:resolved]
* reduce method callsAaron Patterson2010-12-161-1/+1
|
* class inheritable attributes is used no more! all internal use of class ↵Josh Kalderimis2010-11-201-11/+9
| | | | | | inheritable has been changed to class_attribute. class inheritable attributes has been deprecated. Signed-off-by: José Valim <jose.valim@gmail.com>
* use grep instead of select + is_a?Aaron Patterson2010-10-201-2/+2
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-13/+13
| | | | 's/[ \t]*$//' -i {} \;)
* applied guidelines to "# =>"Paco Guzman2010-08-121-1/+1
|
* Tidy up previous commit.José Valim2010-08-021-14/+12
|
* returns not returned . fixing documentation for reflectionNeeraj Singh2010-07-301-28/+30
|
* bringing consistency in commentsNeeraj Singh2010-07-241-14/+17
|
* Adds basic description and title.Rizwan Reza2010-06-161-15/+30
|
* Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-111-4/+4
|
* Bring back +extra_conditions+. This effectively reverts ↵Carl Lerche2010-04-031-1/+2
| | | | 386b7bfd9d78a6d8c8bc7cc4a310df806ad0ba57
* Make the query built by has_many ...., :dependent => :____ lazy since all ↵Carl Lerche2010-04-021-0/+10
| | | | the information is not really available yet.
* cleaning up some test warningsAaron Patterson2010-03-141-3/+5
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Renamed AssociationReflection #collection_association? to #collection?.Eloy Duran2010-01-081-5/+5
|
* Moved the validation logic to the association reflection and refactored ↵Eloy Duran2010-01-071-0/+13
| | | | autosave_association.rb a bit.
* Cleanup some code in nested_attributes.rb, autosave_association.rb, and ↵Eloy Duran2010-01-071-1/+4
| | | | | | associations.rb with AssociationReflection#collection_association? Also cache the result value.
* Add AssociationReflection#collection_association? which returns true if it's ↵Eloy Duran2010-01-071-1/+8
| | | | for a has_many or has_and_belongs_to_many association.
* Make polymorphic_inverse_of in Reflection throw an ↵Murray Steele2009-12-281-5/+5
| | | | | | InverseOfAssociationNotFoundError if the supplied class doesn't have the appropriate association. [#3520 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* Add inverse polymorphic association support. [#3520 state:resolved]George Ogata2009-12-281-2/+12
| | | | Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* Enable has_many :through for going through a has_one association on the join ↵Gabe da Silveira2009-08-101-1/+1
| | | | | | model [#2719 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Break up DependencyModule's dual function of providing a "depend_on" DSL and ↵Joshua Peek2009-05-281-1/+1
| | | | "included" block DSL into separate modules. But, unify both approaches under AS::Concern.
* Use DependencyModule for included hooks in ActiveRecordBryan Helmkamp2009-05-111-3/+1
|
* Providing support for :inverse_of as an option to associations.Murray Steele2009-05-041-0/+21
| | | | | | | | | | | | | | | | | | | | | | You can now add an :inverse_of option to has_one, has_many and belongs_to associations. This is best described with an example: class Man < ActiveRecord::Base has_one :face, :inverse_of => :man end class Face < ActiveRecord::Base belongs_to :man, :inverse_of => :face end m = Man.first f = m.face Without :inverse_of m and f.man would be different instances of the same object (f.man being pulled from the database again). With these new :inverse_of options m and f.man are the same in memory instance. Currently :inverse_of supports has_one and has_many (but not the :through variants) associations. It also supplies inverse support for belongs_to associations where the inverse is a has_one and it's not a polymorphic. Signed-off-by: Murray Steele <muz@h-lame.com> Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Ensure belongs_to association with a counter cache in name spaced model ↵Adam Cooper2009-03-061-1/+1
| | | | | | works [#1678 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Add support for nested object forms to ActiveRecord and the helpers in ↵Eloy Duran2009-02-011-0/+5
| | | | | | | | ActionPack Signed-Off-By: Michael Koziarski <michael@koziarski.com> [#1202 state:committed]
* Cache columns for has_and_belongs_to_many associationslukeludwig2009-01-171-0/+8
| | | | | This avoids repeatedly calling SHOW COLUMNS when the association is queried [#1738 state:committed]
* Remove HasManyAssociationStrategy and move the logic to ↵Pratik Naik2008-10-041-1/+17
| | | | ActiveRecord::Reflection::ThroughReflection.
* Introduce ActiveRecord::Reflection::ThroughReflection to simplify hm:t ↵Pratik Naik2008-10-041-53/+66
| | | | reflection logic
* Add special AssociationReflection methods for creating association objects, ↵Hongli Lai (Phusion)2008-09-091-0/+35
| | | | | | | | and modify the code base to use those methods instead of creating association objects directly. This allows plugins to hook into association object creation behavior. [#986 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Don't raise exception when comparing ActiveRecord::Reflection. [#842 ↵Ryan Bates2008-08-161-1/+1
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Cache sanitized conditions in reflection object for associationsPratik Naik2008-06-271-0/+4
|
* 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