You have to pass it as a variable. So when you define the scope, you
need to define it as a lambda like this:
named_scope :scope_name, lambda { |user|
{ :conditions => ['user_id = ?',user.id] }
}
just an example
On Aug 12, 2:14 pm, Steve VB <[email protected]> wrote:
> how can a named_scope determine who the current user is?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo
Users" 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/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---