vendor/rails/actionpack/lib/action_controller/request.rb in radiant-0.8.0 vs vendor/rails/actionpack/lib/action_controller/request.rb in radiant-0.8.1

- old
+ new

@@ -93,10 +93,14 @@ nil end end end + def media_type + content_type.to_s + end + # Returns the accepted MIME type for the request. def accepts @accepts ||= begin header = @env['HTTP_ACCEPT'].to_s.strip @@ -381,11 +385,11 @@ @parameters ||= request_parameters.merge(query_parameters).update(path_parameters).with_indifferent_access end alias_method :params, :parameters def path_parameters=(parameters) #:nodoc: - @env["rack.routing_args"] = parameters + @env["action_controller.request.path_parameters"] = parameters @symbolized_path_parameters = @parameters = nil end # The same as <tt>path_parameters</tt> with explicitly symbolized keys. def symbolized_path_parameters @@ -397,10 +401,10 @@ # # {'action' => 'my_action', 'controller' => 'my_controller'} # # See <tt>symbolized_path_parameters</tt> for symbolized keys. def path_parameters - @env["rack.routing_args"] ||= {} + @env["action_controller.request.path_parameters"] ||= {} end # The request body is an IO input stream. If the RAW_POST_DATA environment # variable is already set, wrap it in a StringIO. def body