Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Christian Gambardella's Profile

GitHub User: nerdyglasses

Comments by Christian Gambardella


Doesn't painting.image.recreate_versions! do the trick?


No, I didn't know that those exist!

Thank you!


We used it on

It is a German Movie Website.

We had trouble with the mobile first aspect on IE8, because IE8 doesn't support media queries.

I hated to use !important all the time to override Foundation defaults.


In a model I only want to find those which didn't expire, yet.

For that I have a scope:

# Mongoid
scope :live, gt(ends_at:

Should I use Time.current instead? I don't feel like I got the point :)
When I set this variable :ends_at, should I use Time.current + 30.days ?

Thx for the great work!


You are right. Sometimes there where multiple ajax requests.
This script only fires one time, removes the eventlistener on scroll end adds it when finished.

This works with turbolinks.

onEndless = ->
  $(window).off 'scroll', onEndless
  url = $('.paginator .next a').attr('href')
  if url && $(window).scrollTop() > $(document).height() - $(window).height() - 150
    $.getScript url, ->
      $(window).on 'scroll', onEndless
    $(window).on 'scroll', onEndless

$(window).on 'scroll', onEndless

Thx for this episode. Where is part 2? :)

I think this episode needs a part 2 or maybe part 3 episode since most rails apps are more complex. Would be great to have a proof of concept for a website with different pages, authentication, authorization.

Have a nice day.


what would be the best strategy to combine it with e.g. omniauth-facebook?