Skip to content

Commit

Permalink
The home page was added
Browse files Browse the repository at this point in the history
  • Loading branch information
kaievns committed Apr 24, 2010
1 parent cb3bd95 commit 21b3871
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 46 deletions.
2 changes: 2 additions & 0 deletions app/controllers/pages_controller.rb
@@ -0,0 +1,2 @@
class PagesController < ApplicationController
end
13 changes: 13 additions & 0 deletions app/views/pages/index.html.erb
@@ -0,0 +1,13 @@
<h1>Demos Index</h1>

<p>
<%= link_to "Categories", categories_path %> - a simple AJAX CRUD controller example
</p>

<p>
<%= link_to "Pictures", pictures_path %> - another AJAX CRUD controller example, this time with remote files uploading handler
</p>

<p>
<%= link_to "Articles", articles_path %> - various form widgets example, includes Autocompleter, Calendar, Rater, Slider
</p>
48 changes: 2 additions & 46 deletions config/routes.rb
@@ -1,49 +1,5 @@
ActionController::Routing::Routes.draw do |map|
map.resources :articles

map.resources :categories

map.resources :pictures

# The priority is based upon order of creation: first created -> highest priority.

# 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
map.resources :articles, :categories, :pictures

# 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/:id'
map.connect ':controller/:action/:id.:format'
map.root :controller => 'pages', :action => 'index'
end

0 comments on commit 21b3871

Please sign in to comment.