1. Many rapid tags depend on Hobo metadata (e.g. #member_class). I
couldn't figure out whether it's applicable or not on your case, it
might be lost in your filter chain.
2. find_or_paginate() requires listing order specified, either by the
:order option or by model.default_order. I think it's a bug in Hobo
because really a simple case `hobo_index ::User.all` will fail.
Here's a workaround:
def index
filtered_books = Book.apply_scopes(
...
)
filtered_published_licensed_books = filtered_books.published.licensed_to(current_user)
def filtered_published_licensed_books.member_class # for 1., not required if member_class is properly propagated
Book
end
hobo_index filtered_books.published.licensed_to(current_user), :order => Book.default_order # for 2.
end
-----
Tomoaki Hayasaka <haya...@pfsl.mech.tohoku.ac.jp>
You might get around this by making your licensed_to a scope instead so you can pass it straight to the hobo_index. Also solves the pagination problem.
To view this discussion on the web visit https://groups.google.com/d/msg/hobousers/-/sbdWfVh_9HcJ.
--
You received this message because you are subscribed to the Google Groups "Hobo Users" group.
To post to this group, send email to hobo...@googlegroups.com.
To unsubscribe from this group, send email to hobousers+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.