Add admin/pages scaffold and basic page render
This commit is contained in:
1 parent
40831c1314
commit
66604d00f4
12 files changed
+277
-5
No files matched your search
@@ -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
|
||||
@@ -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
@@ -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
|
||||
Reference in new issue
Block a user