That is because you construct a regular Array. In the other cases Hobo
itself should provide the member_class method.

ciao
dd

On Mon, May 23, 2011 at 8:40 AM, Donald R. Ziesig <[email protected]> wrote:

>
>
> Hayasaka san,
>
> Here is a sample of a work around for the problem you are facing:
>
>      @docs_td = Array.new
>      for doc in TransactionDocument.find(:all) do
>        @docs_td<<  doc if doc.review_required?
>      end
>      def @docs_td.member_class
>        TransactionDocument
>      end
>      hobo_index @docs_td
>
> This mixes-in member_class to the array, making it acceptable to hobo_index
> (and a number of other places as well).  This is not my original, I got it
> from the list here a month ago or so.
>
> Don Z.
>
>
>
>
>
> On 5/23/2011 7:17 AM, Tomoaki Hayasaka wrote:
>
>> Is passing an array to hobo_index invalid?  The Hobo Manual says:
>>
>>  hobo_index takes a “finder” as an optional first argument, and
>>> then options. A finder is any object that supports the find and / or
>>> paginate methods, such as an ActiveRecord model class, a has_many
>>> association, or a scope.
>>>
>> and I expect it is valid because there's Array#paginate.  But if I do
>> it (hobo_index ::User.all, :paginate =>  true), I get:
>>
>>   Hobo 1.0.3: undefined method `scope' for #<Array:0xb69d3f6c>
>>   Hobo 1.3pre31: NoMethodError (undefined method `default_order' for
>> []:Array)
>>
>> -----
>> Tomoaki Hayasaka<[email protected]>
>>
>>
> --
> 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.
>
>

-- 
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.

Reply via email to