Added option :ajax for remote page links #133

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
  • Added an option :ajax => true, that will add the data-remote attribute
    to the page links

I see this is a dupe of #100

ryanb commented Oct 30, 2011

I prefer calling this option :remote like in issue #100 to stay consistent with Rails built-in helper methods (link_to, form_for, etc.).

iAgree. I hadn't seen issue #100 but it's a way better symbol. +1 for :remote

@bryanlarsen bryanlarsen added a commit to bryanlarsen/will_paginate that referenced this pull request Mar 2, 2012

@bryanlarsen bryanlarsen add extra_attributes option that adds extra attributes to links.
This is a generalization of of issue #133.  Not all ajax frameworks
work the same was as rails ujs.
9f711f1

@bryanlarsen bryanlarsen added a commit to bryanlarsen/will_paginate that referenced this pull request Mar 2, 2012

@bryanlarsen bryanlarsen add extra_attributes option that adds extra attributes to links.
This is a generalization of of issue #133.  Not all ajax frameworks
work the same was as rails ujs.
f36aaa4

I cant seem to use this any longer. :remote=>false or :ajax=>false does not seem to work.

My code snippet below
= will_paginate @Deals, :remote=>false

thim... no clue. I made my fork to make :remote => true work, but if I don't specify :remote, it's not using data-remote in the links....

Thanks Ace - I thought this was pulled into the master - but no references
there of your code.
So in effect the master will force all links to be ajax links. seems no way
out.

Thanks anyway

Cheers
T

Are you sure? I thought it was the other way around, in the master no links are ajax links... what line of code makes all links ajax links? can you look it up for me? I couldn't find any mention of the word remote (grep -ir remote will_paginate/*)

Cheers
ace

You speak the truth my friend. Even my debug stmts inside the will_paginate
gem show that its output is non-ajax. However My pagination links on the
browser are ajaxified !!! Not sure how but Im looking into it.

Regards
T

On Mon, May 28, 2012 at 8:23 AM, Ace Suares <
reply@reply.github.com

wrote:

Are you sure? I thought it was the other way around, in the master no
links are ajax links... what line of code makes all links ajax links? can
you look it up for me? I couldn't find any mention of the word remote (grep
-ir remote will_paginate/*)

Cheers
ace


Reply to this email directly or view it on GitHub:
#133 (comment)

Owner

mislav commented Jan 10, 2013

See #100

mislav closed this Jan 10, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment