Add admin/pages scaffold and basic page render

This commit is contained in:
Wen-Tien Chang committed 2009-05-08 01:18:16 +08:00
1 parent 40831c1314
commit 66604d00f4
12 files changed
+277 -5

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
+7 -3
View File
@@ -33,9 +33,13 @@ Rails::Initializer.run do |config|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names.
config.time_zone = 'UTC'
config.time_zone = "Taipei"
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
# config.i18n.default_locale = :de
end
end
require 'couch_foo'
CouchFoo::Base.set_database(:host => "http://localhost:5984", :database => "r4")
+10 -2
View File
@@ -1,4 +1,9 @@
ActionController::Routing::Routes.draw do |map|
map.namespace :admin do |admin|
admin.resources :pages
end
# The priority is based upon order of creation: first created -> highest priority.
# Sample of regular route:
@@ -38,6 +43,9 @@ ActionController::Routing::Routes.draw do |map|
# Install the default routes as the lowest priority.
# Note: These default routes make all actions in every controller accessible via GET requests. You should
# consider removing the them or commenting them out if you're using named routes and resources.
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
map.connect ':page_name', :controller => 'pages', :action => 'show'
#map.connect ':controller/:action/:id'
#map.connect ':controller/:action/:id.:format'
end