Fix bug when moderations are empty
parent
6f09cf80a7
commit
3a441d2c0c
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue