Skip to content
Browse files

Updated some docs to reference the latest and greatest and played sty…

…le nazi a little

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7517 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 09e76e6 commit bd311ce9221f1df9711c791d9abfae89e029924d @dhh dhh committed Sep 20, 2007
View
2 railties/configs/initializers/mime_types.rb
@@ -1,3 +1,3 @@
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
-# Mime::Type.register "application/x-mobile", :mobile
+# Mime::Type.register_alias "text/html", :iphone
View
18 railties/configs/routes.rb
@@ -2,25 +2,33 @@
# The priority is based upon order of creation: first created -> highest priority.
# Sample of regular route:
- # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
+ # 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'
+ # 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
+ # map.resources :products
# Sample resource route with options:
- # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
+ # 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 :products, :has_many => [ :comments, :sales ], :has_one => :seller
+
+ # 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.
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
View
6 railties/html/robots.txt
@@ -1 +1,5 @@
-# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
+# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
+#
+# To ban all spiders from the entire site uncomment the next two lines:
+# User-Agent: *
+# Disallow: /
View
20 railties/lib/rails_generator/generators/components/migration/migration_generator.rb
@@ -4,17 +4,17 @@ def manifest
m.migration_template 'migration.rb', 'db/migrate', :assigns => get_local_assigns
end
end
+
- private
-
- def get_local_assigns
- returning(assigns = {}) do
- if class_name.underscore =~ /^(add|remove)_.*_(?:to|from)_(.*)/
- assigns[:migration_action] = $1
- assigns[:table_name] = $2.pluralize
- else
- assigns[:attributes] = []
+ private
+ def get_local_assigns
+ returning(assigns = {}) do
+ if class_name.underscore =~ /^(add|remove)_.*_(?:to|from)_(.*)/
+ assigns[:migration_action] = $1
+ assigns[:table_name] = $2.pluralize
+ else
+ assigns[:attributes] = []
+ end
end
end
- end
end

0 comments on commit bd311ce

Please sign in to comment.
Something went wrong with that request. Please try again.