Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Revision Control

#60

If someone decides to update an article that might take time. Saving a working draft must be an option and the draft shouldn't interfere with the already published article.

Drafts must have a status so that reviewers know if the article is ready or not.

Both news and articles can have drafts.

Reported by Joao Carlos · March 16th, 2009 @ 08:31 AM

State: resolved
Milestone: 0.2 (Alpha 2)
Assigned to: Joao Carlos Joao Carlos

Activity

  1. Matias Korhonen
    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.

    March 16th, 2009 @ 08:41 AM

  2. Joao Carlos
    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
    end
    

    And that means that the drafts table contains the foreign keys.

    March 16th, 2009 @ 09:16 AM

  3. Matias Korhonen
    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.)

    March 16th, 2009 @ 09:26 AM

  4. Matias Korhonen
  5. Matias Korhonen
    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

    March 16th, 2009 @ 11:44 PM

  6. Joao Carlos
    Joao Carlos

    (from [58951924d7d3197e925ee854d0e5fbca1c8e6625]) Started implementing revisions and previews for articles. [#60 Revision Control] http://github.com/jcxplorer/hhlc...

    March 21st, 2009 @ 04:51 PM

  7. Joao Carlos
    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...

    March 21st, 2009 @ 08:25 PM

  8. Joao Carlos
    Joao Carlos

    (from [a058e6066fb10fe6b96f88bd029c491d328cb1fe]) Renamed #diff to #compare. Added role check to #change_revision. [#60 Revision Control] http://github.com/jcxplorer/hhlc...

    March 28th, 2009 @ 01:47 PM

  9. Joao Carlos
    Joao Carlos

    (from [723250a495278eaa3439d1a0d5c6f0f80c18f31e]) Display revisions side by side. [#60 Revision Control] http://github.com/jcxplorer/hhlc...

    March 28th, 2009 @ 01:47 PM

  10. Joao Carlos
    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...

    March 28th, 2009 @ 01:47 PM

  11. Joao Carlos
    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...

    March 28th, 2009 @ 01:47 PM

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.