It would be really great if you could have a look!
I posted the logs at http://gist.github.com/426445 , including the
controller show action.


Thanks a lot,
Sebastian

P.S. I also included a different error even on find_or_paginate, for a
sub-child, which doesnt have a model (a has-many using finder_sql) -
would help really if I could get some hinter here too!

Basically the relation ship is

- site has_many TestStations
- TestStation has_many logs, :finder_sql (...)
- (Log should_belong_to TestStation, but it doesn't, because
finder_sql is not possible for belong_to...)



On 5 Jun., 04:55, Matt Jones <[email protected]> wrote:
> 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