Fix bug when moderations are empty

master
Michèle Marais 2014-04-25 17:03:48 +02:00
parent 6f09cf80a7
commit 3a441d2c0c
1 changed files with 1 additions and 1 deletions

View File

@ -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)