Concurrent Draft
The ConcurrentDraft extension enables draft versions of pages, snippets and layouts, which can be scheduled for promotion to Production. Every such artifact (page, snippet or layout) can have a concurrent draft version, which will be displayed in development mode, and a promoted live version, which will be displayed in production mode.
Created by: Andrew vonderLuft and Sean Cribbs, August 2008, in Portland Oregon
Version History
- 1.0.x – Compatible with Blade UI – 0.9 and above
- 0.8.0 – Compatible with Radiant 0.8.0 and above
- 0.7.1 – Compatible with Radiant 0.7.1
Requirements
- Radiant 0.9 or greater
- Radiant 0.7.x – 0.8.x use appropriate tag
Installation
From the Radiant Extension Registry
- From your RAILS_ROOT run:
script/extension install concurrent_draft
- Restart your app
NOTE: In some earlier versions of Radiant, the migrations may not run, and the assets may not be copied and you may therefore need to run:
rake radiant:extensions:concurrent_draft:migrate
�
rake radiant:extensions:concurrent_draft:update
From Github
- From your RAILS_ROOT run:
cd vendor/extensions
git clone git://github.com/avonderluft/radiant-concurrent_draft-extension.git ./concurrent_draft
cd ../../
rake radiant:extensions:concurrent_draft:migrate
rake radiant:extensions:concurrent_draft:update
- Restart your app
Using the gem
- Install the gem
gem install radiant-concurrent_draft-extension
- Update your Radiant config: add to environment.rb with other gem.configs
config.gem ‘radiant-concurrent_draft-extension’, :lib => false
- Run database migrations
rake db:migrate:extensions
- Copy assets
rake radiant:extensions:update_all
- Restart your app
Caveats
Scheduled times are dependent on the ActiveRecord time setting. If you want to use local time, add this to your environment.rb:
config.active_record.default_timezone = :local
To do
- Add draft controls to Page Index view, probably in the Status column.
Acknowledgments
- Andrew conceived of the ideas for this extension and its initial design, and did model changes, migrations, and initial code for pages.
- Sean collaborated on its expansion and refactoring to include snippets and layouts, and produced most of the final code, including all of the UI.
- Andrew refactored the UI for Radiant 0.9 and higher, added i18n, and gemified the extension.
- After some discussion, they rightly identified the mystery piece as a Haydn Cello concerto.