From bd3b75c675272b84bf0f5c550cc1cc8e94ca1214 Mon Sep 17 00:00:00 2001 From: Matt Dunn-Rankin Date: Sat, 21 Oct 2017 13:32:01 -0700 Subject: [PATCH] =?UTF-8?q?hardcode=20some=20color-specific=20items=20?= =?UTF-8?q?=F0=9F=98=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/item.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/models/item.rb b/app/models/item.rb index b27d768e..548e2c08 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -180,11 +180,19 @@ class Item < ActiveRecord::Base return Color.find_by_name(color.downcase) end - # HACK: omg I hate this. why can't the Baby Raindorf Hoodie Robe just - # contain the standard pattern? >_> - if description.include? 'This soft robe is sure to keep your little one warm and toasty.' + # HACK: this should probably be a flag on the record instead of + # being hardcoded :P + if [71893, 76192, 76202].include?(id) return Color.find_by_name('baby') end + + if [76198].include?(id) + return Color.find_by_name('mutant') + end + + if [75372].include?(id) + return Color.find_by_name('maraquan') + end end end public