app/models/revision.rb in instiki-0.10.1 vs app/models/revision.rb in instiki-0.10.2

- old
+ new

@@ -24,10 +24,12 @@ DateTime.new( @created_at.year, @created_at.mon, @created_at.day, @created_at.hour, @created_at.min ).strftime "%B %e, %Y %H:%M" end + +# todo: drop next_revision, previuous_revision and number from here - unused code def next_revision page.revisions[number + 1] end def previous_revision @@ -105,18 +107,20 @@ end def force_rendering begin display_content.render! - rescue Exception => e + rescue => e ApplicationController.logger.error "Failed rendering page #{@name}" ApplicationController.logger.error e - message = e.message.gsub(/\n/, '<br/>') + message = e.message # substitute content with an error message - content = <<-EOL + self.content = <<-EOL <p>Markup engine has failed to render this page, raising the following error:</p> <p>#{message}</p> + <pre>#{self.content}</pre> EOL + clear_display_cache raise e end end end