1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

17 commits

Author SHA1 Message Date
Rick Olson
ea51d72edb Provide Association Extensions access to the instance that the association is being accessed from. Closes #4433 [josh@hasmanythrough.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4372 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-28 21:33:34 +00:00
Jeremy Kemper
50f538b72b Allow :uniq => true with has_many :through associations.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4325 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-06 23:37:56 +00:00
Rick Olson
4d232025b7 Added descriptive error messages for invalid has_many :through associations: 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
2006-04-05 15:36:02 +00:00
Rick Olson
38bae0a969 Change has_many :through to use the :source option to specify the source association. :class_name is now ignored. [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-24 14:46:17 +00:00
Rick Olson
c8470f8a5b add self referential has_many :through example [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4006 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-21 01:07:16 +00:00
Rick Olson
9a72cd22cf Don't classify the has_one class when eager loading, it is already singular. Add tests. (closes #4117) [jonathan@bluewire.net.nz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3983 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-19 19:32:07 +00:00
Rick Olson
fcd4c9529c Allow has_many :through associations to find the source association by 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
2006-03-19 07:14:48 +00:00
Rick Olson
0925c6b6a0 Allow has_many :through to work on has_many associations (closes #3864) [sco@scottraymond.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3964 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-19 02:01:40 +00:00
Rick Olson
9c9069a675 Fixed has_many :through to include :conditions set on the :through association. closes #4020 [jonathan@bluewire.net.nz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3958 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 23:14:31 +00:00
David Heinemeier Hansson
df97ed5e4c Nicer error message on has_many :through when :through reflection can not be found (closes #4042) [court3nay@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3910 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 03:39:18 +00:00
Rick Olson
a3502c419e Use association's :conditions when eager loading. [jeremyevans0@gmail.com] closes #4144
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-16 06:17:54 +00:00
David Heinemeier Hansson
6427db6baa Added tests for join models and fixed a bug #3177
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3279 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-11 18:06:51 +00:00
Jeremy Kemper
5298f730bb Add :order option to Author.posts_with_comments_and_categories so that tests which assume implicit id order pass with database which do not provide it. Scrubbed whitespace.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2934 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-08 04:36:37 +00:00
David Heinemeier Hansson
49c801b71d Added :include as an option for association declarations [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-06 20:39:34 +00:00
David Heinemeier Hansson
4180e57b70 Added callback hooks to association collections #1549 [Florian Weber]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-04 08:43:57 +00:00
David Heinemeier Hansson
f8783abf0c Made eager loading work even more
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1083 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-03 17:50:11 +00:00
David Heinemeier Hansson
abc895b828 Added new Base.find API and deprecated find_all, find_first. Added preliminary support for eager loading of associations
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1077 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-03 10:52:05 +00:00