Sub-selects with Find


#1

Is it possible to do sub-select queries with Find?


#2

Jose
> Is it possible to do sub-select queries with Find?

Try ‘with_scope’ :
http://api.rubyonrails.com/classes/ActiveRecord/Base.html#M000892

Alain


#3

Try ‘with_scope’ :

http://api.rubyonrails.com/classes/ActiveRecord/Base.html#M000892

More and better examples of with_scope usage:

http://blog.teksol.info/articles/2006/04/14/using-nested-scopes-to-not-repeat-yourself

Alain