From 173effd7a9b847d156a5548e29ae7df67798c7a2 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 13 Jan 2018 17:28:31 -0500 Subject: Fixed incorrect icon eager loading bug on front page A bug was causing a Vigoroth which had evolved into a Slaking to still show up as a Vigoroth on the front page of the engine, even though it showed up properly on its show page. This was deemed to be caused by eager loading. --- app/jobs/pokeviewer/extract_save_data_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/jobs') diff --git a/app/jobs/pokeviewer/extract_save_data_job.rb b/app/jobs/pokeviewer/extract_save_data_job.rb index d1968af..b0999ef 100644 --- a/app/jobs/pokeviewer/extract_save_data_job.rb +++ b/app/jobs/pokeviewer/extract_save_data_job.rb @@ -169,7 +169,7 @@ module Pokeviewer rev.earth_ribbon = param.fetch "earthRibbon", false rev.world_ribbon = param.fetch "worldRibbon", false - if pk.revisions.empty? or rev.diff?(pk.revisions.last) + if pk.revisions.empty? or rev.diff?(pk.current) rev.save! end end -- cgit 1.4.1