Comments on: Simple infinite scroll with Rails & jQuery https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/ Wed, 13 Nov 2019 14:59:53 +0000 hourly 1 https://wordpress.org/?v=6.6.2 By: Julia Zez https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-757 Wed, 13 Nov 2019 14:59:53 +0000 https://christianvarga.com/?p=220#comment-757 thanks helped me a lot

]]>
By: Christian Varga https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-635 Tue, 22 Sep 2015 14:15:00 +0000 https://christianvarga.com/?p=220#comment-635 In reply to Mat Banbury.

Thanks heaps mate! Have a great week!

]]>
By: Mat Banbury https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-634 Tue, 22 Sep 2015 11:34:00 +0000 https://christianvarga.com/?p=220#comment-634 In reply to Christian Varga.

You bet. Enjoy a beer on me!

]]>
By: Christian Varga https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-633 Mon, 21 Sep 2015 23:10:00 +0000 https://christianvarga.com/?p=220#comment-633 In reply to Mat Banbury.

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!

]]>
By: Mat Banbury https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-632 Mon, 21 Sep 2015 22:53:00 +0000 https://christianvarga.com/?p=220#comment-632 In reply to Christian Varga.

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?

]]>
By: Christian Varga https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-631 Mon, 21 Sep 2015 20:58:00 +0000 https://christianvarga.com/?p=220#comment-631 In reply to Mat Banbury.

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.

]]>
By: Mat Banbury https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-630 Mon, 21 Sep 2015 20:28:00 +0000 https://christianvarga.com/?p=220#comment-630 In reply to Christian Varga.

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.

]]>
By: Christian Varga https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-629 Mon, 21 Sep 2015 17:55:00 +0000 https://christianvarga.com/?p=220#comment-629 In reply to Mat Banbury.

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?

]]>
By: Mat Banbury https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-628 Mon, 21 Sep 2015 14:12:00 +0000 https://christianvarga.com/?p=220#comment-628 In reply to Christian Varga.

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.

]]>
By: Christian Varga https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-627 Mon, 21 Sep 2015 13:28:00 +0000 https://christianvarga.com/?p=220#comment-627 In reply to Mat Banbury.

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?

]]>
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" version="2.0">
<channel>
<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>
<![CDATA[ Julia Zez ]]>
</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 &lt;a href=&quot;https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-634&quot;&gt;Mat Banbury&lt;/a&gt;. 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 &lt;a href=&quot;https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-633&quot;&gt;Christian Varga&lt;/a&gt;. 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 &lt;a href=&quot;https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-632&quot;&gt;Mat Banbury&lt;/a&gt;. Thanks very much mate. Please don&#039;t feel obliged to; I&#039;d never ask or expect anything. This blog is for the community! But if you&#039;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&#8217;t feel obliged to; I&#8217;d never ask or expect anything. This blog is for the community! But if you&#8217;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 &lt;a href=&quot;https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-631&quot;&gt;Christian Varga&lt;/a&gt;. Ah of course! Thanks for spotting that. All things considered, getting this tutorial plus the question answered, I&#039;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&#8217;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 &lt;a href=&quot;https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-630&quot;&gt;Mat Banbury&lt;/a&gt;. You&#039;re right, it wasn&#039;t working properly. The problem is in _product_listing.html.erb. Your &quot;Load More&quot; 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&#039;d want something like this: category_path(:category =&#062; @category, :page =&#062; products.next_page) You&#039;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&#8217;re right, it wasn&#8217;t working properly. The problem is in _product_listing.html.erb. Your &#8220;Load More&#8221; 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&#8217;d want something like this:</p> <p>category_path(:category =&gt; @category, :page =&gt; products.next_page)</p> <p>You&#8217;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 &lt;a href=&quot;https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-629&quot;&gt;Christian Varga&lt;/a&gt;. Are you sure it was really working? I&#039;d love to fix this. I tried changing the per_page constant to 2, and other values, but that didn&#039;t to the trick. I think if you&#039;d continue scrolling, you&#039;d see the same thing. The infinite scrolling itself is working, like in your video, but that wasn&#039;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&#8217;d love to fix this. I tried changing the per_page constant to 2, and other values, but that didn&#8217;t to the trick. I think if you&#8217;d continue scrolling, you&#8217;d see the same thing. The infinite scrolling itself is working, like in your video, but that wasn&#8217;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&#8230;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 &lt;a href=&quot;https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-628&quot;&gt;Mat Banbury&lt;/a&gt;. 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 &lt;a href=&quot;https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-627&quot;&gt;Christian Varga&lt;/a&gt;. Sure thing. Here&#039;s the demo repo: https://github.com/batmanbury/infinite_scroll_demo Don&#039;t forget to rake db:seed after all the other setup to get the test products and categories. Thanks for looking! I&#039;ll check back here for any ideas you&#039;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&#8217;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&#8217;t forget to rake db:seed after all the other setup to get the test products and categories.<br /> Thanks for looking! I&#8217;ll check back here for any ideas you&#8217;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 &lt;a href=&quot;https://christianvarga.com/simple-infinite-scroll-with-rails-and-jquery/#comment-626&quot;&gt;Mat Banbury&lt;/a&gt;. 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>
</channel>
</rss>