Changeset 7517
- Timestamp:
- 09/20/07 23:16:06 (1 year ago)
- Files:
-
- trunk/railties/configs/initializers/mime_types.rb (modified) (1 diff)
- trunk/railties/configs/routes.rb (modified) (1 diff)
- trunk/railties/html/robots.txt (modified) (1 diff)
- trunk/railties/lib/rails_generator/generators/components/migration/migration_generator.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/railties/configs/initializers/mime_types.rb
r6869 r7517 1 1 # Add new mime types for use in respond_to blocks: 2 2 # Mime::Type.register "text/richtext", :rtf 3 # Mime::Type.register "application/x-mobile", :mobile3 # Mime::Type.register_alias "text/html", :iphone trunk/railties/configs/routes.rb
r6869 r7517 3 3 4 4 # Sample of regular route: 5 # map.connect 'products/:id', :controller => 'catalog', :action => 'view'5 # map.connect 'products/:id', :controller => 'catalog', :action => 'view' 6 6 # Keep in mind you can assign values other than :controller and :action 7 7 8 8 # Sample of named route: 9 # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'9 # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase' 10 10 # This route can be invoked with purchase_url(:id => product.id) 11 11 12 12 # Sample resource route (maps HTTP verbs to controller actions automatically): 13 # map.resources :products13 # map.resources :products 14 14 15 15 # Sample resource route with options: 16 # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }16 # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get } 17 17 18 18 # Sample resource route with sub-resources: 19 # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller 19 # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller 20 21 # Sample resource route within a namespace: 22 # map.namespace :admin do |admin| 23 # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb) 24 # admin.resources :products 25 # end 20 26 21 27 # You can have the root of your site routed with map.root -- just remember to delete public/index.html. 22 28 # map.root :controller => "welcome" 29 30 # See how all your routes lay out with "rake routes" 23 31 24 32 # Install the default routes as the lowest priority. trunk/railties/html/robots.txt
r1876 r7517 1 1 # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file 2 # 3 # To ban all spiders from the entire site uncomment the next two lines: 4 # User-Agent: * 5 # Disallow: / trunk/railties/lib/rails_generator/generators/components/migration/migration_generator.rb
r7422 r7517 5 5 end 6 6 end 7 7 8 8 private 9 10 def get_local_assigns11 returning(assigns = {}) do12 if class_name.underscore =~ /^(add|remove)_.*_(?:to|from)_(.*)/13 assigns[:migration_action] = $114 assigns[:table_name] = $2.pluralize15 else16 assigns[:attributes] = []9 private 10 def get_local_assigns 11 returning(assigns = {}) do 12 if class_name.underscore =~ /^(add|remove)_.*_(?:to|from)_(.*)/ 13 assigns[:migration_action] = $1 14 assigns[:table_name] = $2.pluralize 15 else 16 assigns[:attributes] = [] 17 end 17 18 end 18 19 end 19 end20 20 end