public
Fork of vigetlabs/sandstone
Description: A resourceful plugin providing lightweight content management functionality to Rails applications
Homepage: http://www.viget.com/extend/sandstone-a-drop-in-cms-for-existing-rails-applications/
Clone URL: git://github.com/bscofield/sandstone.git
update README to reflect tester_xtreme dependency; allow pages to be set 
to no-parent


git-svn-id: http://svn.extendviget.com/lab/trunk/plugins/sandstone@550 
e959a6d6-1924-0410-92b3-a6fa492f4c66
ben (author)
Thu Feb 21 11:17:17 -0800 2008
commit  41a1d6375bcb6e30fd4a702beaa26dc4d29ee843
tree    823535a7d234d95c62ca4cf5214f4e2020d56f4e
parent  b740da4bd1efcbb6e453bb502b15d539070be4de
0
...
8
9
10
 
 
11
12
13
...
8
9
10
11
12
13
14
15
0
@@ -8,6 +8,8 @@ Dependencies
0
 ============
0
 You must be running acts_as_versioned and acts_as_tree to use Sandstone.
0
 
0
+The generated tests also require the tester_xtreme plugin, which you can install from http://svn.extendviget.com/lab/trunk/plugins/tester_xtreme.
0
+
0
 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+.
0
 
0
 +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.
0
...
3
4
5
 
6
7
 
8
9
10
...
3
4
5
6
7
8
9
10
11
12
0
@@ -3,8 +3,10 @@ x switch integration point from polymorphism to simple foreign key
0
   x update documentation
0
 x refactor filesystem caching out of Page and PageTemplate into a single module
0
 - allow arbitrary metadata
0
+- add helper tests
0
 
0
 LATER
0
+- use acts_as_state_machine for workflow
0
 - manage dynamic page content
0
 - manage content chunks within pages
0
 ? patch render to allow render :sandstone => [path] (replacement for partials???)
...
2
3
4
5
6
7
 
 
 
8
9
10
...
2
3
4
 
 
 
5
6
7
8
9
10
0
@@ -2,9 +2,9 @@ module PagesHelper
0
   include SandstoneHelper
0
 
0
   def parent_pages_for(page)
0
- pages = Page.find(:all, :select => 'id, title').map {|p| [p.title, p.id]}
0
- pages.reject {|p| p[1] == page.id} unless page.new_record?
0
- pages
0
+ conditions = page.new_record? ? nil : ['id != ?', page.id]
0
+ pages = Page.find(:all, :select => 'id, title', :conditions => conditions).map {|p| [p.title, p.id]}
0
+ [['none', '']] + pages
0
   end
0
 
0
   def editors_for(page)

Comments

    No one has commented yet.