Pagination not working for children models
Reported by Tim | January 20th, 2011 @ 10:12 AM | in Hobo 1.4
Related with this post: http://groups.google.com/group/hobousers/browse_thread/thread/731e3...
I'm using the latest HOBO EDGE version:
gem "hobo", :git => "http://github.com/tablatom/hobo.git",
:branch => "rails3"
Scenario
I have these models:
Company
has_many :company_resources, :dependent => :destroy
has_many :resources, :through => :company_resources, :uniq =>
true
children :company_resources
cattr_reader :per_page
@@per_page = 20
CompanyResource
belongs_to :company
belongs_to :resource
cattr_reader :per_page
@@per_page = 20
Resource
has_many :company_resources, :dependent => :destroy
has_many :companies, :through => :company_resources, :uniq =>
true
cattr_reader :per_page
@@per_page = 20
I need to have the company_resources to be a nested_route for
company.
So, for example, I need to display the company_resources of the
company: URL => companies/company_id/company_resources
For this, I have placed a children reference in the Company model
and
in the CompanyResources controller I have:
auto_actions_for :company, [:index, :new, :create]
Problem:
The pagination just don't work.
I have the will_paginate gem in the Gemfile and the proper settings
in
the models.
Cheers.
Comments and changes to this ticket
-
Domizio Demichelis March 22nd, 2011 @ 07:38 PM
Tim, please, could you create a new bare app, add the minimum that will reproduce the error and upload it here as an attachment. That would speed up the fix. Thank you.
-
Matt Jones September 15th, 2011 @ 06:44 PM
- State changed from new to open
- Milestone set to Hobo 1.4
- Milestone order changed from 197942 to 0
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป