Will the find from acts_as_paranoid filter down to an :include? For instance class parent acts_as_paranoid has_many: children end and class child acts_as_paranoid belongs_to :parent end Then if you Parent.find(:all, :include => children) you will get all the children if they are deleted or not. I guess the find that filters out the deleted_at is null does not filter down to the includes like this. -- Regards, Ian Connor -------------- next part -------------- An HTML attachment was scrubbed... URL: wrath.rubyonrails.org/pipermail/rails/attachments/20060314/539fa473/attachment.html
On 3/14/06, Ian Connor <ian.connor@gmail.com> wrote:> Will the find from acts_as_paranoid filter down to an :include? > > For instance > > class parent > acts_as_paranoid > has_many: children > end > > and > > class child > acts_as_paranoid > belongs_to :parent > end > > Then if you > > Parent.find(:all, :include => children) > > you will get all the children if they are deleted or not. I guess the find > that filters out the deleted_at is null does not filter down to the includes > like this. > > -- > Regards, > Ian ConnorNope. has_many :children, :conditions => "deleted_at IS NULL" -- Rick Olson techno-weenie.net
thanks - that would certain fix it :) On 3/14/06, Rick Olson <technoweenie@gmail.com> wrote:> > On 3/14/06, Ian Connor <ian.connor@gmail.com> wrote: > > Will the find from acts_as_paranoid filter down to an :include? > > > > For instance > > > > class parent > > acts_as_paranoid > > has_many: children > > end > > > > and > > > > class child > > acts_as_paranoid > > belongs_to :parent > > end > > > > Then if you > > > > Parent.find(:all, :include => children) > > > > you will get all the children if they are deleted or not. I guess the > find > > that filters out the deleted_at is null does not filter down to the > includes > > like this. > > > > -- > > Regards, > > Ian Connor > > Nope. > > has_many :children, :conditions => "deleted_at IS NULL" > > > -- > Rick Olson > techno-weenie.net > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > lists.rubyonrails.org/mailman/listinfo/rails >-- Regards, Ian Connor -------------- next part -------------- An HTML attachment was scrubbed... URL: wrath.rubyonrails.org/pipermail/rails/attachments/20060316/1b04b9ca/attachment.html