hobo_index_for should support :scope to filter records
Reported by Matt Jones | December 3rd, 2009 @ 09:32 PM | in Hobo 1.0 - Final
hobo_index does it; is there a compelling reason to not support this? Would be good, for consistency, to get this in before 1.0.
Comments and changes to this ticket
-
Tom Locke December 5th, 2009 @ 10:45 AM
Agreed. In fact I just discovered recently that it's actually a real pain to add a scope to an index_for so this would be very useful.
-
Owen January 10th, 2010 @ 07:16 PM
- State changed from new to open
- Assigned user changed from Matt Jones to Bryan Larsen
Just suggesting Bryan as not sure of Matt's time availability
-
Matt Jones January 12th, 2010 @ 07:11 PM
- Assigned user changed from Bryan Larsen to Matt Jones
-
Matt Jones January 18th, 2010 @ 04:22 AM
A little buried over here, but can anybody take a look at the attached patch - it should work, as it's a straightforward array manipulation, but I've got a meeting to get ready for.
It's designed to support the same
:scope
syntax as has_many and friends; either an array of zero-argument scopes, or a hash of scopes with parameters. It supports arbitrary parameters, so you can do:hobo_index_for :some_owner, :scope => { :foo => [1,2,3], :baz => 'bar' }
-
Owen January 18th, 2010 @ 12:32 PM
Hey Bryan/Matt,
This is great. Can you give me a couple of real-life examples that I can
model for the book?-Owen
-
Bryan Larsen January 30th, 2010 @ 02:55 PM
- State changed from open to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป