From 3a441d2c0cb3a8df31a3cc21d510060d7a1fa0d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mich=C3=A8le=20Marais?= Date: Fri, 25 Apr 2014 17:03:48 +0200 Subject: [PATCH] Fix bug when moderations are empty --- lib/the_moderator/model.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/the_moderator/model.rb b/lib/the_moderator/model.rb index bb49fbd..82ada13 100644 --- a/lib/the_moderator/model.rb +++ b/lib/the_moderator/model.rb @@ -14,7 +14,7 @@ module TheModerator def moderate(*moderated_attributes) data = moderation_data(*moderated_attributes) moderations.build(data: {attributes: data[:data]}, - data_display: data[:data_display]) unless data.empty? + data_display: data[:data_display]) unless data[:data].empty? end def moderated?(attr_name)