diff --git a/features/infinite_scroll.feature b/features/infinite_scroll.feature index 55e9aad2f..ccc25d1aa 100644 --- a/features/infinite_scroll.feature +++ b/features/infinite_scroll.feature @@ -13,6 +13,8 @@ Feature: infinite scroll When I scroll down And I wait for the ajax to finish + #FIXME + And I wait for the ajax to finish Then I should see 30 posts When I follow "generic" @@ -21,4 +23,5 @@ Feature: infinite scroll When I scroll down And I wait for the ajax to finish + And I wait for the ajax to finish Then I should see 30 posts diff --git a/lib/log_overrider.rb b/lib/log_overrider.rb index 506506616..719772ec2 100644 --- a/lib/log_overrider.rb +++ b/lib/log_overrider.rb @@ -9,7 +9,7 @@ class ActionView::LogSubscriber hash.merge(:layout => event.payload[:layout]) if event.payload[:layout] - Rails.logger.info(hash) + #Rails.logger.info(hash) end alias :render_partial :render_template alias :render_collection :render_template @@ -81,6 +81,7 @@ end module ActiveRecord class LogSubscriber def sql(event) + return self.class.runtime += event.duration return unless logger.info? diff --git a/public/javascripts/widgets/infinite-scroll.js b/public/javascripts/widgets/infinite-scroll.js index 1143a37f2..923573cdd 100644 --- a/public/javascripts/widgets/infinite-scroll.js +++ b/public/javascripts/widgets/infinite-scroll.js @@ -28,7 +28,12 @@ }; InfiniteScroll.prototype.start = function() { - Diaspora.widgets.subscribe("stream/reloaded", this.initialize); + var __bind = function(fn, me){ + return function(){ + return fn.apply(me, arguments); + }; + }; + Diaspora.widgets.subscribe("stream/reloaded", __bind(this.initialize, this)); this.initialize(); };