I have:

Adults - has many Kids
Kids - belong to adults

I want to view a table plus of all the kids for an adult.

In the app/controllers/adults.rb, I say:

  def show
    @adult = find_instance
    @kids = @adult.
      kids.
      search(params[:search], :name, :age).
      order_by(parse_sort_param(:name, :age)).
      paginate(page: params[:page])
    hobo_show
  end

In the app/views/adults/show.dryml (or in 
app/views/taglibs/application.dryml for the Adult Show):

      <section param="collection-section">
        <h3 param="collection-heading"></h3>
        ....
        <table-plus with="&@kids" fields="this,age">
          <empty-message:>No kids</empty-message:>
        </table-plus>
      </section>

I have tried adding:

          <page-nav:/>

before the </table-plus>

If I have an index of Kids, I can get a paginated table:

<index-page>
  <collection: replace>
    <table-plus fields="this,age">
      <empty-message:>No kids</empty-message:>
    </table-plus>
  </collection:>
</index-page>

I don't need to explicitly ask, it just arrives.

Happy to build a test system to demo the problem and throw it on 
Github/Bitbucket, if needed.

But hoping that someone just knows why I sometimes get table pagination and 
sometimes don't. Is it because I'm calling a child collection and need to 
decorate it, somehow?

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to