views:

98

answers:

1

I want users to be able to see what was added / changed in a blog post. I'm using Vestal Versions (great gem) to keep track of changes, but I don't know how to show this to users so they can see what has changed.

My first impulse is to find a diffing library for ruby and just show the diff between version N and version N-1. What's a good library for this? Is there a more abstract way to do this?

Also, does anyone have any opinion on whether Vestal Versions is better than acts_as_audited?

+1  A: 

As for the first question, you should check out HTMLDiff, which gaves you a diff method that compares changes and shows them with proper HTML tags (ins, del) which you can then style with CSS.

I've not used acts_as_audited, but from looking through it's Github page, seems similar. Maybe someone with more experience in both could bring some light to it :)

Yaraher