count field value follows number of items on index page
Reported by Don Ziesig | December 21st, 2010 @ 01:12 AM | in Hobo 1.3 (Rails 3)
This error occurs for both standard index pages and those overridden by table plus.
Test case has 44 Profiles:
At the top of the first page: There are already
30 Profiles.
At the top of the second page: There are already
14 Profiles.
Similarly on the Users tab of the admin sub-site where there are 46 Users,
At the top of the first page: There are already
30 Users.
At the top of the second page: There are already
16 Users.
This is due to the use of this.size in the dryml index code, where this is populated from pagination, I fixed it by overriding the generated code, but I'm not sure how to fix it in the Hobo generator.
WRONG <ht key="profile.collection.count"
count="&this.size">
**
RIGHT **<ht key="profile.collection.count"
count="&model.count">
Comments and changes to this ticket
-
Domizio Demichelis December 30th, 2010 @ 06:49 PM
- Milestone set to Hobo 1.3 (Rails 3)
- Assigned user set to Domizio Demichelis
- Milestone order changed from 197932 to 0
Please, could you try &this.total_entries? That would speedup my job. Thanks.
-
Matt Jones January 3rd, 2011 @ 09:39 PM
@Don: Note that
model.count
isn't going to be correct either if there are any filters / searches on the query, as it's going to do a straight SQL count.We should probably dump the whole expression used by the
count
tag into a helper or something. Not sure what to name it, though... -
Bryan Larsen March 11th, 2011 @ 01:56 PM
- Milestone order changed from 42 to 0
(from [090ac14ea2aea123d8e975252a000fc967b58c17]) [#889] count value is displaying count of page rather than of collection https://github.com/tablatom/hobo/commit/090ac14ea2aea123d8e975252a0...
-
Bryan Larsen March 11th, 2011 @ 01:56 PM
(from [60342e3f6198d039e3dd5ab5c845def29afcc8a9]) [#889] use new method for count tag also https://github.com/tablatom/hobo/commit/60342e3f6198d039e3dd5ab5c84...
-
Bryan Larsen March 11th, 2011 @ 01:56 PM
- State changed from new to resolved
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 »
People watching this ticket
Referenced by
- 889 count field value follows number of items on index page (from [090ac14ea2aea123d8e975252a000fc967b58c17]) [#889] ...
- 889 count field value follows number of items on index page (from [60342e3f6198d039e3dd5ab5c845def29afcc8a9]) [#889] ...