Skip to content

webpulser/rails-content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
= RailsContent

RailsContent is an extension of Ruby on Rails for CMS development

= Versionning

= Prerequisites

== Plugins

* acts_as_list
* acts_as_tree
* attachment_fu
* habtm_list
* jrails
* restful_authentication
* will_paginate
* tinyMCE

Install acts_as_list :
 $ ./script/plugin install git://github.com/rails/acts_as_list.git

Install acts_as_tree :
 $ ./script/plugin install git://github.com/rails/acts_as_tree.git

Install attachment_fu :
 $ git clone git://github.com/technoweenie/attachment_fu.git vendor/plugins/attachment_fu

Install habtm_list :
 $ ./script/plugin install git://github.com/SFEley/habtm_list.git

Install jrails :
 $ ./script/plugin install http://ennerchi.googlecode.com/svn/trunk/plugins/jrails

Install restful_authentication :
 $ git clone git://github.com/technoweenie/restful-authentication.git vendor/plugins/restful_authentication

Install mislav-will_paginate :
 $ gem sources -a http://gems.github.com
 $ gem install mislav-will_paginate

Install tinyMCE :
 $ ./script/plugin install git://github.com/kete/tiny_mce.git
 $ rake tiny_mce:install


== Update environment.rb

Add desert plugin in Rails::Initializer.run do |config|
  config.gem 'desert', :version => '0.4.1', :lib => 'desert'


== Initialize Rails Content

 $ ./script/generate migration install_rails_content_plugin

Edit the generated file :
 - in self.up method, add :   migrate_plugin 'rails_content', LAST_MIGRATION
 - in self.down method, add : migrate_plugin 'rails_content', 0

Note: LAST_MIGRATION is the number of the last database migration of Rails Content.
 
 $ rake db:migrate;
 $ rake rails_content:fixtures:load FIXTURES=people,pages;
 $ rake rails_content:generate:rights_and_roles;
 $ rake rails_content:sync


== Update routes.rb

Replace your routes by :
  map.routes_from_plugin(:rails_content)

The default root url is 'home'. 
You can change this by adding the folllowing line:

  # for url like /page_url
  map.root :controller => 'cms', :action => 'show', :url => 'page_url'

  # for url like /section1/section2/page_url
  map.root :controller => 'cms', :action => 'show', :url => 'page_url', :sections => ["section1", "section2"]


== Set locales (if not already done)

For example, add in config/initializers/i18n.rb :
  LOCALES = { 'en' => 'en', 'fr' => 'fr' }

Then set up project name for each locale.
For English, edit config/locales/en.yml and add :
  en:
    project_name: My website


= Default settings

== Admin

 URL: /admin
 Login: admin@rails-content.org
 Password: admin

== Pages

* HomePage
* 404 page

Powered by [http://www.webpulser.com Webpulser]

Releases

No releases published

Packages

No packages published