aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/reflection.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* | Add explicit tests for the nested through association changes in reflection.rbJon Leighton2010-10-191-2/+13
| |
* | Bugfix/refactoringJon Leighton2010-10-191-0/+9
| |
* | Remove unused methodsJon Leighton2010-10-191-11/+0
| |
* | Support for :primary_key option on the source reflection of a through ↵Jon Leighton2010-10-191-0/+8
| | | | | | | | association, where the source is a has_one or has_many
* | Properly support conditions on any of the reflections involved in a nested ↵Jon Leighton2010-10-191-3/+50
| | | | | | | | through association
* | Make sure nested through associations are read onlyJon Leighton2010-10-151-0/+4
| |
* | Integrate nested support into ThroughAssociationScope, using my concept of ↵Jon Leighton2010-10-021-10/+40
| | | | | | | | generating a 'chain' of reflections to be joined. It seems to work at the moment, all existing tests are passing. There may be further complications as we add more test cases for nested associations, though.
* | Started implementing nested :through associations by using the existing ↵Jon Leighton2010-10-011-0/+15
| | | | | | | | structure of ThroughAssociationScope rather than layering a module over the top
* | Initial nested_has_many_through support [#1152]Bodaniel Jeanes2010-09-261-3/+3
|/
* 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
* [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