Permalink
Browse files

Basic controller to handle page updates.

  • Loading branch information...
1 parent ddf31b4 commit 13a55c0f51fd346db984ccb931d0364e742b9f41 @peakpg peakpg committed Oct 30, 2012
@@ -0,0 +1,8 @@
+module Cms
+ class PageComponentsController < Cms::ApplicationController
+
+ def update
+ render text: "Hello"
+ end
+ end
+end
@@ -24,7 +24,7 @@
<%= render 'layouts/cms/thin_toolbar' %>
<script type="text/javascript">
// Set to the url that you want to save any given page to, leave null for default handling.
- var saveUrl = null;
+ var saveUrl = '<%= cms.page_component_path(current_page) %>';
// Instantiate the PageEditor
new Mercury.PageEditor(saveUrl, {
View
@@ -14,6 +14,7 @@
match '/toolbar', :to=>"toolbar#index", :as=>'toolbar'
match '/content_types', :to=>"content_types#index", :as=>'content_types'
+ resources :page_components
resources :connectors do
member do
put :move_up
View
@@ -10,8 +10,12 @@ load File.expand_path('../../test/dummy/script/rails', __FILE__)
# - rails destroy
# I kept the above (for now anyway) so I can get access to rails server, though I will need to test that it works for other commands too.
+# Bugs: Adding the following would:
+# 1. Enable generators to work correctly (right now they put code into test/dummy)
+# 2. Prevent loading, since engine requires other files directly.
+
#ENGINE_ROOT = File.expand_path('../..', __FILE__)
-#ENGINE_PATH = File.expand_path('../../lib/browsercms/engine', __FILE__)
-#
+#ENGINE_PATH = File.expand_path('../../lib/cms/engine', __FILE__)
+##
#require 'rails/all'
#require 'rails/engine/commands'

0 comments on commit 13a55c0

Please sign in to comment.