Revision Control
-
Matias Korhonen
We have to think very carefully about how we should do this.
Do we do a separate table for drafts, or should we add a column to the existing tables?
If we have a separate table, should we store the ID of the draft in the news/articles table, or the ID of the article/news in the drafts table.
-
Joao Carlos
Separate table for drafts.
With ActiveRecord associations we get the following.
class Draft < ActiveRecord::Base belongs_to :news belongs_to :articles end class News < ActiveRecord::Base has_one :draft end class Article < ActiveRecord::Base has_one :draft endAnd that means that the drafts table contains the foreign keys.
-
Matias Korhonen
I think that the problem with that is that it gets very expensive on the database because of the checks to see if an article as a draft. Also if one article only has one draft, why do it this way (especially as it will require separate columns for news and article IDs, which is questionable database design, I think.)
-
Matias Korhonen
CMS Revision Control: http://ronny.haryan.to/archives/...
Acts_As_Versioned: http://www.juixe.com/techknow/in...
Acts_As_Versioned (on github): http://github.com/technoweenie/a...
Riff Rails (diff): http://www.juixe.com/techknow/in...
-
Matias Korhonen
- State changed from new to open
- Title changed from Drafting system to Revision Control
Update:
- Acts_As_Versioned seems to have serious problems with Rails 2.x
- Riff Rails hasn't been updated for a very long time
- We cannot seem to find good ruby ports of patch and diff
-
Joao Carlos
(from [58951924d7d3197e925ee854d0e5fbca1c8e6625]) Started implementing revisions and previews for articles. [#60 Revision Control] http://github.com/jcxplorer/hhlc...
-
Joao Carlos
(from [b2480a3f1500729457825759d7588d216b25e54d]) Implemented bulk actions for articles. Added a page to display differences between any two revisions. Delete #toggle_publish. [#56 Redesign administration] [#60 Revision Control] http://github.com/jcxplorer/hhlc...
-
Joao Carlos
(from [a058e6066fb10fe6b96f88bd029c491d328cb1fe]) Renamed #diff to #compare. Added role check to #change_revision. [#60 Revision Control] http://github.com/jcxplorer/hhlc...
-
Joao Carlos
(from [723250a495278eaa3439d1a0d5c6f0f80c18f31e]) Display revisions side by side. [#60 Revision Control] http://github.com/jcxplorer/hhlc...
-
Joao Carlos
(from [ac7cafbeb9b6d4fb3902c2f3c28dfd08f1f96dce]) Added #current_revision. Prevented the user from creating a new revision if no changes were made. [#60 Revision Control] http://github.com/jcxplorer/hhlc...
-
Joao Carlos
- State changed from open to resolved
(from [00dbcc98091dd90233b962d4e1fa7932f9428815]) Added a partial to allow the user to select which revisions to compare. [#60 Revision Control state:resolved] http://github.com/jcxplorer/hhlc...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.