-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
50 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,48 +1,11 @@ | |||
ActionController::Routing::Routes.draw do |map| | ActionController::Routing::Routes.draw do |map| | ||
# The priority is based upon order of creation: first created -> highest priority. | |||
|
|
||
map.resource :view_models do |vm| | map.resource :view_models do |vm| | ||
vm.resource :book | vm.resource :book | ||
end | end | ||
|
|
||
# Sample of regular route: | |||
# map.connect 'products/:id', :controller => 'catalog', :action => 'view' | |||
# Keep in mind you can assign values other than :controller and :action | |||
|
|||
# Sample of named route: | |||
# map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase' | |||
# This route can be invoked with purchase_url(:id => product.id) | |||
|
|||
# Sample resource route (maps HTTP verbs to controller actions automatically): | |||
# map.resources :products | |||
|
|||
# Sample resource route with options: | |||
# map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get } | |||
|
|||
# Sample resource route with sub-resources: | |||
# map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller | |||
|
|||
# Sample resource route with more complex sub-resources | |||
# map.resources :products do |products| | |||
# products.resources :comments | |||
# products.resources :sales, :collection => { :recent => :get } | |||
# end | |||
|
|||
# Sample resource route within a namespace: | |||
# map.namespace :admin do |admin| | |||
# # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb) | |||
# admin.resources :products | |||
# end | |||
|
|||
# You can have the root of your site routed with map.root -- just remember to delete public/index.html. | |||
# map.root :controller => "welcome" | |||
|
|||
# See how all your routes lay out with "rake routes" | |||
|
|||
# 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 or commenting them out if you're using named routes and resources. | |||
map.connect ':controller/:action' | map.connect ':controller/:action' | ||
map.connect ':controller/:action/:id' | map.connect ':controller/:action/:id' | ||
map.connect ':controller/:action/:id.:format' | map.connect ':controller/:action/:id.:format' | ||
|
|||
end | end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,2 +1,4 @@ | |||
source :gemcutter | |||
|
|||
gem 'rails', '3.0.0.beta4' | gem 'rails', '3.0.0.beta4' | ||
# gem 'view_models', '>=2.0.0' | gem 'haml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,22 +1,22 @@ | |||
# # SQLite version 3.x | # SQLite version 3.x | ||
# # gem install sqlite3-ruby (not necessary on OS X Leopard) | # gem install sqlite3-ruby (not necessary on OS X Leopard) | ||
# development: | development: | ||
# adapter: sqlite3 | adapter: sqlite3 | ||
# database: db/development.sqlite3 | database: db/development.sqlite3 | ||
# pool: 5 | pool: 5 | ||
# timeout: 5000 | timeout: 5000 | ||
# |
|
||
# # Warning: The database defined as "test" will be erased and | # Warning: The database defined as "test" will be erased and | ||
# # re-generated from your development database when you run "rake". | # re-generated from your development database when you run "rake". | ||
# # Do not set this db to the same as development or production. | # Do not set this db to the same as development or production. | ||
# test: | test: | ||
# adapter: sqlite3 | adapter: sqlite3 | ||
# database: db/test.sqlite3 | database: db/test.sqlite3 | ||
# pool: 5 | pool: 5 | ||
# timeout: 5000 | timeout: 5000 | ||
# |
|
||
# production: | production: | ||
# adapter: sqlite3 | adapter: sqlite3 | ||
# database: db/production.sqlite3 | database: db/production.sqlite3 | ||
# pool: 5 | pool: 5 | ||
# timeout: 5000 | timeout: 5000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,58 +1,11 @@ | |||
Rails300::Application.routes.draw do |map| | Rails300::Application.routes.draw do |map| | ||
# The priority is based upon order of creation: |
|
||
# first created -> highest priority. | map.resource :view_models do |vm| | ||
|
vm.resource :book | ||
# Sample of regular route: | end | ||
# match 'products/:id' => 'catalog#view' |
|
||
# Keep in mind you can assign values other than :controller and :action | map.connect ':controller/:action' | ||
|
map.connect ':controller/:action/:id' | ||
# Sample of named route: | map.connect ':controller/:action/:id.:format' | ||
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase |
|
||
# This route can be invoked with purchase_url(:id => product.id) | |||
|
|||
# Sample resource route (maps HTTP verbs to controller actions automatically): | |||
# resources :products | |||
|
|||
# Sample resource route with options: | |||
# resources :products do | |||
# member do | |||
# get :short | |||
# post :toggle | |||
# end | |||
# | |||
# collection do | |||
# get :sold | |||
# end | |||
# end | |||
|
|||
# Sample resource route with sub-resources: | |||
# resources :products do | |||
# resources :comments, :sales | |||
# resource :seller | |||
# end | |||
|
|||
# Sample resource route with more complex sub-resources | |||
# resources :products do | |||
# resources :comments | |||
# resources :sales do | |||
# get :recent, :on => :collection | |||
# end | |||
# end | |||
|
|||
# Sample resource route within a namespace: | |||
# namespace :admin do | |||
# # Directs /admin/products/* to Admin::ProductsController | |||
# # (app/controllers/admin/products_controller.rb) | |||
# resources :products | |||
# end | |||
|
|||
# You can have the root of your site routed with "root" | |||
# just remember to delete public/index.html. | |||
# root :to => "welcome#index" | |||
|
|||
# See how all your routes lay out with "rake routes" | |||
|
|||
# This is a legacy wild controller route that's not recommended for RESTful applications. | |||
# Note: This route will make all actions in every controller accessible via GET requests. | |||
# match ':controller(/:action(/:id(.:format)))' | |||
end | end |