This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
mcornick (author)
Wed Mar 05 12:30:19 -0800 2008
commit 1514af9ccdb2b23b1bf14a33fe4d411b017caaf4
tree 9981db9e70fddb61a335f8912c7d62b11c0497aa
parent 73cf952bfd33f3dd03b406bd3fcf7c58ce90eedf
tree 9981db9e70fddb61a335f8912c7d62b11c0497aa
parent 73cf952bfd33f3dd03b406bd3fcf7c58ce90eedf
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Tue Sep 11 07:29:47 -0700 2007 | [ben] |
| |
README | Thu Feb 21 11:17:17 -0800 2008 | [ben] |
| |
Rakefile | Tue Sep 11 07:29:47 -0700 2007 | [ben] |
| |
TODO | Thu Feb 21 11:17:17 -0800 2008 | [ben] |
| |
generators/ | Thu Feb 21 11:17:17 -0800 2008 | [ben] |
| |
init.rb | Tue Sep 11 07:29:47 -0700 2007 | [ben] |
| |
install.rb | Tue Sep 11 07:29:47 -0700 2007 | [ben] |
| |
lib/ | Tue Feb 26 07:02:46 -0800 2008 | [ben] |
| |
tasks/ | Wed Sep 26 10:58:57 -0700 2007 | [ben] |
| |
uninstall.rb | Tue Sep 11 07:29:47 -0700 2007 | [ben] |
README
Sandstone ========= Introduction goes here. Dependencies ============ You must be running acts_as_versioned and acts_as_tree to use Sandstone. The generated tests also require the tester_xtreme plugin, which you can install from http://svn.extendviget.com/lab/trunk/plugins/tester_xtreme. You do not need to use the RESTful Authentication plugin to use Sandstone, but it will help. At a mininum, you must define the methods +logged_in?+, +current_user+, and +access_denied+ in +ApplicationController+. +current_user+ must return an object that can match up with Sandstone's +editor+ object. +access_denied+ should handle redirection and messaging when a non-editor tried to visit an administrative page. Models ====== Sandstone hooks into your application through a user model. If your users are actually represented by a model named User, you're in luck - all you have to do is add the following line to user.rb: has_one :editor It's a little trickier if you've named the model something else (like Member). In that case, add this to your existing model: has_one :editor, :foreign_key => :user_id And update editor.rb with the name of your model: belongs_to :user, :class_name => "PUT YOUR CLASS NAME HERE" Whatever user model you use, it should respond to a request for +name+ - that's what the Sandstone admin interface displays for its editors. Note that this means you'll have to add a name method or column to your User model if you're running RESTful Authentication. Controllers =========== Add the following line to your ApplicationController: include SandstoneSystem If you want to audit editor logins, you should add +Audit.log('login', editor)+ to the action that logs people in. Routes ====== You must add the following routes (or similar ones) to your config/routes.rb file. Note that +map.sandstone '*path'+ is a catch-all route, so if you're relying on the standard Rails default route (+':controller/:action/:id'+) you may have to do some more work to get Sandstone running. map.workspace 'editor/home', :controller => 'editors', :action => 'show' map.resources :audits map.resources :editors map.resources :pages map.resources :page_templates map.resource :preview map.resource :sitemap map.sandstone '*path', :controller => 'pages', :action => 'show' Example ======= Example goes here. Copyright (c) 2007 Ben Scofield, released under the MIT license




