It works, but you've got a stray .*. there, which is doing the wrong
thing. User.all.select { } is what you're looking for.
--Matt Jones
On Aug 18, 2009, at 3:16 PM, Scott Bronson wrote:
> >> User.all.*.select { |u| u.has_invalid_preference }
>
> ArgumentError: wrong number of arguments (0 for 1)
> from /home/bronson/backend/vendor/plugins/hobo/hobosupport/lib/
> hobo_support/enumerable.rb:49:in `select'
> from /home/bronson/backend/vendor/plugins/hobo/hobosupport/lib/
> hobo_support/enumerable.rb:49:in `send'
> from /home/bronson/backend/vendor/plugins/hobo/hobosupport/lib/
> hobo_support/enumerable.rb:49:in `method_missing'
> from /home/bronson/backend/vendor/plugins/hobo/hobosupport/lib/
> hobo_support/enumerable.rb:49:in `map'
> from /home/bronson/backend/vendor/plugins/hobo/hobosupport/lib/
> hobo_support/enumerable.rb:49:in `send'
> from /home/bronson/backend/vendor/plugins/hobo/hobosupport/lib/
> hobo_support/enumerable.rb:49:in `method_missing'
> from (irb):1
>
>
> I haven't looked too far into this. Does anyone know offhand if I
> should be able to call select on a collection of Hobo models?
>
> - Scott
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---