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

26 commits

Author SHA1 Message Date
Jeremy Kemper
440f2890af Dynamic finders on association collections respect association :limit. Closes #10227 [Jack Danger Canty]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-21 07:32:44 +00:00
Michael Koziarski
7d459203ee Make Dynamic Finders on Association Collections Respect Association :order [patrick.t.joyce, technoweenie]. Closes #10211
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8174 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-21 01:51:57 +00:00
Rick Olson
3104291322 Fix HasManyThrough Association so it uses :conditions on the HasMany Association. Closes #9729 [danger]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8128 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-11 01:03:43 +00:00
Jeremy Kemper
a72c1ec43e Refactor association create and build so before & after callbacks behave consistently. Closes #8854.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-16 05:07:58 +00:00
Michael Koziarski
82b244e3ff Make sure has_many associations honour :include when counting. Closes #9167 [danger]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7325 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-08-16 04:36:55 +00:00
Michael Koziarski
d0ff4ec193 Don't call unsupported methods on associated objects when using :include, :method with to_xml [manfred, jwilger] Closes #7307
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-30 03:31:48 +00:00
Rick Olson
cdb5132c41 Fix has_many :through to add the appropriate conditions when going through an association using STI. Closes #5783. [Jonathan Viney]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5305 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-15 16:37:11 +00:00
Rick Olson
8e3bf70bcd Removes the ability for eager loaded conditions to be interpolated, since there is no model instance to use as a context for interpolation. #5553 [turnip@turnipspatch.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5264 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-09 02:46:57 +00:00
Jeremy Kemper
b1257d96b7 has_many :through conditions are sanitized by the associating class. Closes #5971.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-01 05:31:56 +00:00
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