Minor correction to better display versions. Refs #15

This commit is contained in:
echarp 2016-01-10 01:39:31 +01:00
parent b89ca5deb8
commit 0c0d07381b
2 changed files with 2 additions and 2 deletions

View File

@ -15,9 +15,9 @@
:ruby
if version.event == 'create'
object = version.item_type.constantize.find_by_id version.item_id
next unless object.try(:moderated?)
end
object = version.reify if object.nil?
next unless object.try(:moderated?)
changes = ''
if version.event == 'update'

View File

@ -38,9 +38,9 @@ xml.rdf :RDF,
@versions.each do |version|
if version.event == 'create'
object = version.item_type.constantize.find_by_id version.item_id
next unless object.moderated?
end
object = version.reify if object.nil?
next unless object.moderated?
url = polymorphic_url(version.item_type.tableize.singularize,
id: version.item_id)