Cmsable
This project rocks and uses MIT-LICENSE.
Installation:
Add to your Gemfile
gem 'cmsable'
Make sure you’re using ckeditor 4
bundle install
If that doesn’t work
bundle update ckeditor
Add to your routes
mount Cmsable::Engine => '/cmsable'
Install and run the migrations if you want to use the built in model
rake cmsable:install:migrations
rake dm:migrate
Cmsable uses CanCan so make sure this is setup in your necessary controller(s) If your users aren’t called users then you’ll get something like:
undefined local variable or method `current_user' for ...
You need to define the current_ability, e.g.
def current_ability
@current_ability ||= AccountAbility.new(current_account)
end
From github.com/ryanb/cancan/wiki/changing-defaults
Usage:
In your layout
<%= cmsable_assets %>
To use the built in model
In your view files
<%= cmsable 'identifier' %>
Identifier can be anything, for example ‘Homepage Intro’ or something
To use existing models
Add to your model
cmsable :body => :column_to_use_for_content
Then in your views
<%= cmsable @model_instance %>
TODO
Complete gemspec
Handle save fails
Rename to Messable
Allow to fallback to built in auth if no CanCan
Add other auth library support?
Setup config initializer for added customizability
Create some tests, I guess
Add support for "image mode" content
Change highlight so empty areas are still visible