Open inspire22 opened 13 years ago
Hi Inspire,
I think that Maximiliano (maxguzenski) is right. There's no need for a renderer like mine anymore. It far more easy to do it with pure JavaScript. So I'm gonna declare this project death for Rails 3.
Even so, I'm updating "flow_pagination_example" with Rails 3 and no special renderer. Instead I'm gonna provide a jQuery plugin to solve the same problem. I started this morning and I think can be ready for tomorrow.
What do you think?
Second thought, I'm still gonna fix it. So, it will be ready by tomorrow. Also, I'm gonna fix the other issue, multiple pagination in the same page.
Any other ideas for FlowPagination?
um, i think the other half of my problem is that I'm using the jquery rails.js - which doesn't seem to support .rjs??? sigh!
ah i've been kinda able to figure this out now by doing .js.haml and just writing it in jquery with .html( #{ render :collection => @objects} ) / etc
Hi Inspire,
I'm stuck with same problem. undefined method `total_pages_for_collection' for WillPaginate::ViewHelpers:Module
Could you let me know did you resolve it?
I have the following in my index.js.erb -
$('#d_list').append("<%= escape_javascript(render(:partial => @deals)) %>")
$('#flow_pagination').html("<%= will_paginate(@deals, :renderer => FlowPagination::LinkRenderer) %>")
I replied to an older closed issue, but I don't think you saw it so trying as a new one.
Also, more docs about what to put in the .rjs file/etc would be handy. The example gives an idea, but I'm not sure that everyone clicks over to there.
Finally got around to trying this - now I'm getting a new error on the line that renders the pagination.
undefined method `total_pages_for_collection' for WillPaginate::ViewHelpers:Module Callback:
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/bundler/gems/flow_pagination-6884aa57882a/lib/flow_pagination.rb:48:in
last_page' /Users/inspire/.rvm/gems/ree-1.8.7-2010.02/bundler/gems/flow_pagination-6884aa57882a/lib/flow_pagination.rb:12:in
to_html' /Users/inspire/.rvm/gems/ree-1.8.7-2010.02/bundler/gems/will_paginate-b1a5beeec9f5/lib/will_paginate/view_helpers/base.rb:63:inwill_paginate' /Users/inspire/.rvm/gems/ree-1.8.7-2010.02/bundler/gems/will_paginate-b1a5beeec9f5/lib/will_paginate/view_helpers/action_view.rb:33:in
will_paginate' actionpack (3.0.3) lib/action_view/template.rb:135:insend' actionpack (3.0.3) lib/action_view/template.rb:135:in
render' activesupport (3.0.3) lib/active_support/notifications.rb:54:ininstrument' actionpack (3.0.3) lib/action_view/template.rb:127:in
render' actionpack (3.0.3) lib/action_view/render/rendering.rb:59:in_render_template' activesupport (3.0.3) lib/active_support/notifications.rb:52:in
instrument' activesupport (3.0.3) lib/active_support/notifications/instrumenter.rb:21:ininstrument' activesupport (3.0.3) lib/active_support/notifications.rb:52:in
instrument' actionpack (3.0.3) lib/action_view/render/rendering.rb:56:in_render_template' actionpack (3.0.3) lib/action_view/render/rendering.rb:26:in
render_without_haml' haml (3.0.25) lib/haml/helpers/action_view_mods.rb:13:in `render'