Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
will_paginate & ambition? count method seems incompatible
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
csmosx  
View profile  
 More options Jul 30 2009, 5:45 pm
From: csmosx <csm...@gmail.com>
Date: Thu, 30 Jul 2009 14:45:48 -0700 (PDT)
Local: Thurs, Jul 30 2009 5:45 pm
Subject: will_paginate & ambition? count method seems incompatible
Hi,

I'm using:
ambition-0.5.4
ambitious-activerecord-0.1.3
mislav-will_paginate-2.3.11

Will_paginate won't print pagination links on my pages, when using
Ambition.
It thinks my collections have a total_entries size of zero.
I am new to Ambition, any help would be appreciated...

Using ambition I get this:

>> guh = Broker.paginate(:page => nil, :per_page => 5)
=> [<the result>]
>> guh.total_entries

=> 0

Without ambition (standard AR):

>> guh = Broker.paginate(:page => nil, :per_page => 5)
=> [<the result>]
>> guh.total_entries

=> 20

I figure this must have something to do with the count method...

With ambition, I get:

>> Broker.count
=> 0
>> Broker.all.count

=> 20

Without ambition (standard AR):

>> Broker.count

=> 20

Thanks!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Hoskings  
View profile  
 More options Jul 30 2009, 9:08 pm
From: Ben Hoskings <b...@hoskings.net>
Date: Fri, 31 Jul 2009 11:08:53 +1000
Local: Thurs, Jul 30 2009 9:08 pm
Subject: Re: will_paginate & ambition? count method seems incompatible
I ran into similar problems; I've fixed some #count-related stuff in  
my fork:

http://github.com/benhoskings/ambition

Cheers
Ben

On 31/07/2009, at 7:45 AM, csmosx wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Merritt  
View profile  
 More options Jul 31 2009, 1:42 pm
From: Chris Merritt <csm...@gmail.com>
Date: Fri, 31 Jul 2009 12:42:20 -0500
Local: Fri, Jul 31 2009 1:42 pm
Subject: Re: will_paginate & ambition? count method seems incompatible
Thanks Ben, your fork seems to have fixed it and is working well.
I thank you.

On Jul 30, 2009, at 8:08 PM, Ben Hoskings wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »