<title>
Comments on: Simple infinite scroll with Rails & jQuery </title>
<atom:link href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/feed/" rel="self" type="application/rss+xml"/>
<link>https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/</link>
<description/>
<lastBuildDate>Wed, 13 Nov 2019 14:59:53 +0000</lastBuildDate>
<sy:updatePeriod>
hourly </sy:updatePeriod>
<sy:updateFrequency>
1 </sy:updateFrequency>
<generator>https://wordpress.org/?v=6.6.2</generator>
<item>
<title>
By: Julia Zez </title>
<link>https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-757</link>
<dc:creator>
...</dc:creator>
<pubDate>Wed, 13 Nov 2019 14:59:53 +0000</pubDate>
<guid isPermaLink="false">https://christianvarga.com/?p=220#comment-757</guid>
<description>
<![CDATA[ thanks helped me a lot ]]>
...</description>
<content:encoded>
<![CDATA[ <p>thanks helped me a lot</p>
]]>
...</content:encoded>
...</item>
<item>
<title>
By: Christian Varga </title>
<link>https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-635</link>
<dc:creator>
<![CDATA[ Christian Varga ]]>
...</dc:creator>
<pubDate>Tue, 22 Sep 2015 14:15:00 +0000</pubDate>
<guid isPermaLink="false">https://christianvarga.com/?p=220#comment-635</guid>
<description>
<![CDATA[ In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-634">Mat Banbury</a>.
Thanks heaps mate! Have a great week! ]]>
...</description>
<content:encoded>
<![CDATA[ <p>In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-634">Mat Banbury</a>.</p>
<p>Thanks heaps mate! Have a great week!</p>
]]>
...</content:encoded>
...</item>
<item>
<title>
By: Mat Banbury </title>
<link>https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-634</link>
<dc:creator>
<![CDATA[ Mat Banbury ]]>
...</dc:creator>
<pubDate>Tue, 22 Sep 2015 11:34:00 +0000</pubDate>
<guid isPermaLink="false">https://christianvarga.com/?p=220#comment-634</guid>
<description>
<![CDATA[ In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-633">Christian Varga</a>.
You bet. Enjoy a beer on me! ]]>
...</description>
<content:encoded>
<![CDATA[ <p>In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-633">Christian Varga</a>.</p>
<p>You bet. Enjoy a beer on me!</p>
]]>
...</content:encoded>
...</item>
<item>
<title>
By: Christian Varga </title>
<link>https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-633</link>
<dc:creator>
<![CDATA[ Christian Varga ]]>
...</dc:creator>
<pubDate>Mon, 21 Sep 2015 23:10:00 +0000</pubDate>
<guid isPermaLink="false">https://christianvarga.com/?p=220#comment-633</guid>
<description>
<![CDATA[ In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-632">Mat Banbury</a>.
Thanks very much mate. Please don't feel obliged to; I'd never ask or expect anything. This blog is for the community! But if you'd still like to throw a few coins my way, Paypal is great! ]]>
...</description>
<content:encoded>
<![CDATA[ <p>In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-632">Mat Banbury</a>.</p>
<p>Thanks very much mate. Please don’t feel obliged to; I’d never ask or expect anything. This blog is for the community! But if you’d still like to throw a few coins my way, Paypal is great!</p>
]]>
...</content:encoded>
...</item>
<item>
<title>
By: Mat Banbury </title>
<link>https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-632</link>
<dc:creator>
<![CDATA[ Mat Banbury ]]>
...</dc:creator>
<pubDate>Mon, 21 Sep 2015 22:53:00 +0000</pubDate>
<guid isPermaLink="false">https://christianvarga.com/?p=220#comment-632</guid>
<description>
<![CDATA[ In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-631">Christian Varga</a>.
Ah of course! Thanks for spotting that. All things considered, getting this tutorial plus the question answered, I'd like to send something your way. I see you have a donation link. Or would you prefer Bitcoin? ]]>
...</description>
<content:encoded>
<![CDATA[ <p>In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-631">Christian Varga</a>.</p>
<p>Ah of course! Thanks for spotting that. All things considered, getting this tutorial plus the question answered, I’d like to send something your way. I see you have a donation link. Or would you prefer Bitcoin?</p>
]]>
...</content:encoded>
...</item>
<item>
<title>
By: Christian Varga </title>
<link>https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-631</link>
<dc:creator>
<![CDATA[ Christian Varga ]]>
...</dc:creator>
<pubDate>Mon, 21 Sep 2015 20:58:00 +0000</pubDate>
<guid isPermaLink="false">https://christianvarga.com/?p=220#comment-631</guid>
<description>
<![CDATA[ In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-630">Mat Banbury</a>.
You're right, it wasn't working properly. The problem is in _product_listing.html.erb. Your "Load More" link is pointing to the products controller, not the category controller. So on the first lazy load, it just goes and loads all products. You'd want something like this:
category_path(:category => @category, :page => products.next_page)
You'd also need to change it in the categories/show.js.erb view as well. ]]>
...</description>
<content:encoded>
<![CDATA[ <p>In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-630">Mat Banbury</a>.</p>
<p>You’re right, it wasn’t working properly. The problem is in _product_listing.html.erb. Your “Load More” link is pointing to the products controller, not the category controller. So on the first lazy load, it just goes and loads all products. You’d want something like this:</p>
<p>category_path(:category => @category, :page => products.next_page)</p>
<p>You’d also need to change it in the categories/show.js.erb view as well.</p>
]]>
...</content:encoded>
...</item>
<item>
<title>
By: Mat Banbury </title>
<link>https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-630</link>
<dc:creator>
<![CDATA[ Mat Banbury ]]>
...</dc:creator>
<pubDate>Mon, 21 Sep 2015 20:28:00 +0000</pubDate>
<guid isPermaLink="false">https://christianvarga.com/?p=220#comment-630</guid>
<description>
<![CDATA[ In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-629">Christian Varga</a>.
Are you sure it was really working? I'd love to fix this. I tried changing the per_page constant to 2, and other values, but that didn't to the trick. I think if you'd continue scrolling, you'd see the same thing. The infinite scrolling itself is working, like in your video, but that wasn't the problem. It just continues to load and load, when there should only be something like 24 results. Instead it always goes to 100. Hmmm...frustrating. Thanks for looking though. ]]>
...</description>
<content:encoded>
<![CDATA[ <p>In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-629">Christian Varga</a>.</p>
<p>Are you sure it was really working? I’d love to fix this. I tried changing the per_page constant to 2, and other values, but that didn’t to the trick. I think if you’d continue scrolling, you’d see the same thing. The infinite scrolling itself is working, like in your video, but that wasn’t the problem. It just continues to load and load, when there should only be something like 24 results. Instead it always goes to 100. Hmmm…frustrating. Thanks for looking though.</p>
]]>
...</content:encoded>
...</item>
<item>
<title>
By: Christian Varga </title>
<link>https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-629</link>
<dc:creator>
<![CDATA[ Christian Varga ]]>
...</dc:creator>
<pubDate>Mon, 21 Sep 2015 17:55:00 +0000</pubDate>
<guid isPermaLink="false">https://christianvarga.com/?p=220#comment-629</guid>
<description>
<![CDATA[ In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-628">Mat Banbury</a>.
Very strange, it appears to be working properly for me: https://www.youtube.com/watch?v=D-hjn02QRe4 (I changed the constant to 2). Could be something in your environment? ]]>
...</description>
<content:encoded>
<![CDATA[ <p>In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-628">Mat Banbury</a>.</p>
<p>Very strange, it appears to be working properly for me: <a href="https://www.youtube.com/watch?v=D-hjn02QRe4" rel="nofollow ugc">https://www.youtube.com/watch?v=D-hjn02QRe4</a> (I changed the constant to 2). Could be something in your environment?</p>
]]>
...</content:encoded>
...</item>
<item>
<title>
By: Mat Banbury </title>
<link>https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-628</link>
<dc:creator>
<![CDATA[ Mat Banbury ]]>
...</dc:creator>
<pubDate>Mon, 21 Sep 2015 14:12:00 +0000</pubDate>
<guid isPermaLink="false">https://christianvarga.com/?p=220#comment-628</guid>
<description>
<![CDATA[ In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-627">Christian Varga</a>.
Sure thing. Here's the demo repo: https://github.com/batmanbury/infinite_scroll_demo
Don't forget to rake db:seed after all the other setup to get the test products and categories.
Thanks for looking! I'll check back here for any ideas you've got. ]]>
...</description>
<content:encoded>
<![CDATA[ <p>In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-627">Christian Varga</a>.</p>
<p>Sure thing. Here’s the demo repo: <a href="https://github.com/batmanbury/infinite_scroll_demo" rel="nofollow ugc">https://github.com/batmanbury/infinite_scroll_demo</a><br />
Don’t forget to rake db:seed after all the other setup to get the test products and categories.<br />
Thanks for looking! I’ll check back here for any ideas you’ve got.</p>
]]>
...</content:encoded>
...</item>
<item>
<title>
By: Christian Varga </title>
<link>https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-627</link>
<dc:creator>
<![CDATA[ Christian Varga ]]>
...</dc:creator>
<pubDate>Mon, 21 Sep 2015 13:28:00 +0000</pubDate>
<guid isPermaLink="false">https://christianvarga.com/?p=220#comment-627</guid>
<description>
<![CDATA[ In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-626">Mat Banbury</a>.
Hmm, that should work, will_paginate definitely supports it. Have you got a github repo I can clone to have a look? Or can you clone my repo and make an quick demo? ]]>
...</description>
<content:encoded>
<![CDATA[ <p>In reply to <a href="https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-626">Mat Banbury</a>.</p>
<p>Hmm, that should work, will_paginate definitely supports it. Have you got a github repo I can clone to have a look? Or can you clone my repo and make an quick demo?</p>
]]>
...</content:encoded>
...</item>