When i apply the "hobo_index :paginate => false" to my index
controller, i get an "undefined method `total_pages' for #<Array:
0x106511fb0>" error, like the view still expects a pagination to
occur...
What to do..?
The autogenerated page doesn't know that you've turned off pagination
in the controller. You can either write your own index view, or just
add a view hint:
paginate? false
to the file in app/viewhints/ corresponding to your model.
@Tom, Bryan: would it make sense to harden the page-nav tag against
this kind of thing, to make the automatic index-page tag more useful?
Either that, or we should be checking the viewhint in
find_or_paginate, but it seems silly to have to switch one option off
in two spots.
--Matt Jones
second, i should have mentioned that i was working on the user model,
and there i can't get i to work. The view generation is not affected
by the user.hints.rb file i've created (but i suspect it's because the
user model is not a standard hobo model!?)
Where in the page dryml is the pagination declared. Can't seem to find
it in the rapid pages.dryml file.
I've run into similar things modifying controller code for an index
page and it's not clear at first what just broke other than the magic
hobo index method does something yours doesn't.
I managed to get it working with this code in the index.dryml
<index-page>
<content-body:>
<table-plus fields="this, administrator?"/>
</content-body:>
</index-page>
On 3 Feb., 19:15, Bryan Larsen <bryan.lar...@gmail.com> wrote:
> ticket created:https://hobo.lighthouseapp.com/projects/8324-hobo/tickets/621-harden-...