Ok, I see the code you're talking about. Line 129 of
base_controller<http://github.com/bborn/communityengine/blob/master/app/controllers/base_controller.rb#L129>
has
that 'active' scope applied to the 'find_by_activity' method. It shouldn't
be there (fixed in
edge<http://github.com/bborn/communityengine/blob/edge/app/controllers/base_controller.rb#L129>),
because the 'find_by_activity' method already includes a SQL condition to
ensure only active users' activity is returned.

Thanks,
Bruno

On Thu, May 13, 2010 at 2:16 PM, Patrick Minton <[email protected]>wrote:

> Basically if there are inactive users that have activity that the
> find_by_activity method would find, then this method fails with an
> ActiveRecord::RecordNotFound exception for the same reason that the
> following would cause that exception:
>
> User.active.find(ID_OF_SOME_INACTIVE_USER)
>
> On May 12, 2010, at 8:31 PM, Jim Ruther Nill wrote:
>
> > Hi! Correct me if I'm wrong but named_scopes won't work on this because
> it's not an active_record method.
> > So User.active.find_by_activity won't really scope for active users only.
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "CommunityEngine" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> [email protected]<communityengine%[email protected]>
> .
> > For more options, visit this group at
> http://groups.google.com/group/communityengine?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "CommunityEngine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<communityengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/communityengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"CommunityEngine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/communityengine?hl=en.

Reply via email to