[Nitro] Revisable -- is it the correct semantics??
aglarond at gmail.com
Wed Jun 28 07:18:07 EDT 2006
On 6/28/06, James Britt <james.britt at gmail.com> wrote:
> Michael Fellinger wrote:
> > ...
> > I am all for this solution, would make it easy to use stuff like
> > class Page
> > is Reviseable
> > property :title, String
> > property :text, String
> > end
> > page = Page.create_with :title => 'hello world' :text => 'puts "Hello
> > page.save
> > # this should be revision 0
> > page.save
> > # revision 1 - yes, i want automagic revising...
> What was revised? You want the revision number to get upped on every
> save, even if the item has not changed? Hmmm.
I like the way Pimki handled this with the concept of 'continuous edit':
The default behaviour when revising a page is of a 'Continuous Edit'.
This means that if the previous edit was done by the same author and
less than 30 minutes ago, this edit is minor and only the latest
version will be kept as the revision. Otherwise (different author
and/or more than 30 minutes ago) this edit will create a new revision
of the page.
This default behaviour can be overriden by specifying a major/minor
Maybe this is something Nitro/Og could implement. It wouldn't necessarily
have to be tied to Madeleine (Pimki's storage engine).
On the other hand, to do otherwise may introduce assorted questions
> about determining when something has changed in a meaningful way (i.e.,
> some concept of a 'dirty' flag)
> James Britt
> http://www.ruby-doc.org - Ruby Help & Documentation
> http://www.artima.com/rubycs/ - The Journal By & For Rubyists
> http://www.rubystuff.com - The Ruby Store for Ruby Stuff
> http://www.jamesbritt.com - Playing with Better Toys
> http://www.30secondrule.com - Building Better Tools
> Nitro-general mailing list
> Nitro-general at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Nitro-general