Changeset 4637
- Timestamp:
- 07/31/06 18:59:58 (2 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/base.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/request.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/resources.rb (added)
- trunk/actionpack/lib/action_controller/routing.rb (modified) (7 diffs)
- trunk/actionpack/test/controller/resources_test.rb (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r4634 r4637 1 1 *SVN* 2 3 * Added map.resources from the Simply Restful plugin [DHH]. Examples (the API has changed to use plurals!): 4 5 map.resources :messages 6 map.resources :messages, :comments 7 map.resources :messages, :new => { :preview => :post } 2 8 3 9 * Fixed that integration simulation of XHRs should set Accept header as well [Edward Frederick] trunk/actionpack/lib/action_controller/base.rb
r4590 r4637 3 3 require 'action_controller/response' 4 4 require 'action_controller/routing' 5 require 'action_controller/resources' 5 6 require 'action_controller/url_rewriter' 6 7 require 'drb' trunk/actionpack/lib/action_controller/request.rb
r4277 r4637 16 16 # Returns the HTTP request method as a lowercase symbol (:get, for example) 17 17 def method 18 @request_method ||= @env['REQUEST_METHOD'].downcase.to_sym 18 @request_method ||= (method = parameters[:_method] && method == :post) ? 19 method.to_s.downcase.to_sym : 20 @env['REQUEST_METHOD'].downcase.to_sym 19 21 end 20 22 trunk/actionpack/lib/action_controller/routing.rb
r4625 r4637 59 59 end 60 60 61 def normalize_paths(paths =$LOAD_PATH)61 def normalize_paths(paths = $LOAD_PATH) 62 62 # do the hokey-pokey of path normalization... 63 63 paths = paths.collect do |path| … … 352 352 353 353 protected 354 355 354 def requirement_for(key) 356 355 return requirements[key] if requirements.key? key … … 416 415 false 417 416 end 418 419 417 end 420 418 … … 451 449 value 452 450 end 453 454 451 end 455 452 456 453 class DividerSegment < StaticSegment 457 458 454 def initialize(value = nil) 459 455 super(value) … … 465 461 true 466 462 end 467 468 463 end 469 464 … … 761 756 762 757 class RouteSet 763 764 758 # Mapper instances are used to build routes. The object passed to the draw 765 759 # block in config/routes.rb is a Mapper instance. … … 840 834 841 835 private 842 843 836 def url_helper_name(name, kind = :url) 844 837 :"#{name}_#{kind}"