I’ve been buried in launch prep for work and really needed a break. Not from coding, just from work. So, I went through and pulled in several changes from the friendly strangers on GitHub and corrected the issues listed in all the GitHub tickets.

Single table inheritance

acts_as_revisable was previously non-functional on STI models. Now it works nicely. I do suspect there may be a few more issues lurking with this but, in my testing I didn’t run across anything.

Note: It does require explicit use of the acts_as_(revisable|revision) calls in all the subclasses.

Thanks Diego Scataglini for the report.

validates_uniqueness_of

This issue was reported in detail by Chris Blunt. Basically, for the revisable and revision models I use Rails’ default_scope functionality. validates_uniqueness_of ignores the default scope.

acts_as_revisable now patches validates_uniqueness_of by default while allowing you to disable this functionality with a simple flag.

Thanks Chris.

Miscellaneous bug fixes

There were a bunch of little bug fixes from a few users on GitHub. These include:

  • proper time zone support
  • added and better specs describing revision number behavior
  • corrected a bug with revision numbering
  • support #find_revision(:last)

Thank you moklett, martinh and aguynamedryan.

1740 Responses to “acts_as_revisable 1.1.1 - now with STI love and more”

  1. f Says:

    Thanks for your really nice gem. Unlike other version-gems this gem provides deep-thought funtionality

Leave a Reply