On Jun 4, 2010, at 7:08 PM, Togg wrote:

I use a has_many/belongs_to relationship and also have declared the
children viewhint so when showing the parent object the childs will be
displayed.

In the show action of the parent object I tried to use the hobo_index
to allow paginating the childs, however that fails with a "can't
convert String into Integer" error while rendering the show page...

def show
 @this = find_instance
 @hmrefname = @this.hmrefname.apply_scopes(...)
 # doesnt work:
 hobo_index(@hmrefname, :per_page => 5)
 # works:
 find_or_paginate(@hmrefname, :per_page => 5)
end

Whats the problem - and whats the fix ? :-)
Btw. I want to say that by using rails+hobo I made very good progress
so big thanks to the Hobo team!

If you're not a REST absolutist, the simplest solution might be to move the action in question to the controller for the child model and use auto_actions_for. That will get you pagination straight out of the tin...

On the other hand, I'm curious to see where the above approach goes wrong. Could you post a stack trace?

--Matt Jones

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