From 87ed561d451c853ff7705f2a7f90df53c8fe30e5 Mon Sep 17 00:00:00 2001 From: cmrd Senya Date: Mon, 10 Apr 2017 18:26:39 +0300 Subject: [PATCH] bump rails-timeago Here we also set autoDispose to false. This is an option that was introduced sometime after our last bump. Default is true and it disposes timeago object if it is not in DOM. But that is the way we initialize timeago objects, therefore if we have autoDispose=true then they will be disposed before they inserted in DOM. So by using autoDispose=false we enforce previous behavior that worked fine for us. --- Gemfile | 2 +- Gemfile.lock | 6 +++--- app/assets/javascripts/widgets/timeago.js | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 1fb74a0e1..e87d4e833 100644 --- a/Gemfile +++ b/Gemfile @@ -183,8 +183,8 @@ gem "typhoeus", "1.1.2" gem "gon", "6.1.0" gem "hamlit", "2.8.0" gem "mobile-fu", "1.3.1" +gem "rails-timeago", "2.16.0" gem "will_paginate", "3.1.5" -gem "rails-timeago", "2.11.0" # Logging diff --git a/Gemfile.lock b/Gemfile.lock index 3241688a5..6b2899769 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -568,7 +568,7 @@ GEM rails-i18n (4.0.8) i18n (~> 0.7) railties (~> 4.0) - rails-timeago (2.11.0) + rails-timeago (2.16.0) actionpack (>= 3.1) activesupport (>= 3.1) rails_admin (0.8.1) @@ -734,7 +734,7 @@ GEM unf (~> 0.1.0) typhoeus (1.1.2) ethon (>= 0.9.0) - tzinfo (1.2.2) + tzinfo (1.2.3) thread_safe (~> 0.1) uglifier (3.1.2) execjs (>= 0.3.0, < 3) @@ -886,7 +886,7 @@ DEPENDENCIES rails-assets-markdown-it-sup (= 1.0.0)! rails-assets-perfect-scrollbar (= 0.6.16)! rails-i18n (= 4.0.8) - rails-timeago (= 2.11.0) + rails-timeago (= 2.16.0) rails_admin (= 0.8.1) rb-fsevent (= 0.9.8) rb-inotify (= 0.9.8) diff --git a/app/assets/javascripts/widgets/timeago.js b/app/assets/javascripts/widgets/timeago.js index 4d159818f..69d082b7e 100644 --- a/app/assets/javascripts/widgets/timeago.js +++ b/app/assets/javascripts/widgets/timeago.js @@ -26,6 +26,8 @@ } }); } + + $.timeago.settings.autoDispose = false; }); }; })(); -- GitLab