adds missing requires for Object#try

This commit is contained in:
Xavier Noria
2010-08-09 15:14:00 +02:00
parent 195e891954
commit efb2bd0409
7 changed files with 12 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
require 'active_support/core_ext/object/try'
module ActionMailer
# This is the API which is deprecated and is going to be removed on Rails 3.1 release.
# Part of the old API will be deprecated after 3.1, for a smoother deprecation process.

View File

@@ -1,5 +1,6 @@
require 'active_support/core_ext/object/blank'
require 'active_support/core_ext/object/with_options'
require 'active_support/core_ext/object/try'
module ActionDispatch
module Routing

View File

@@ -1,6 +1,7 @@
require 'stringio'
require 'uri'
require 'active_support/core_ext/kernel/singleton_class'
require 'active_support/core_ext/object/try'
require 'rack/test'
require 'test/unit/assertions'

View File

@@ -1,3 +1,4 @@
require 'active_support/core_ext/object/try'
require 'action_controller/vendor/html-scanner'
require 'action_view/helpers/tag_helper'

View File

@@ -1,3 +1,4 @@
require 'active_support/core_ext/object/try'
require 'abstract_unit'
class ResourcesController < ActionController::Base

View File

@@ -1,4 +1,5 @@
require 'active_support/core_ext/object/blank'
require 'active_support/core_ext/object/try'
module ActiveRecord
module Calculations

View File

@@ -123,7 +123,11 @@ module ActiveResource
# def post(path, body, headers)
# request = ActiveResource::Request.new(:post, path, body, headers)
# self.class.requests << request
# self.class.responses.assoc(request).try(:second) || raise(InvalidRequestError.new("No response recorded for #{request}"))
# if response = self.class.responses.assoc(request)
# response[1]
# else
# raise InvalidRequestError.new("No response recorded for #{request}")
# end
# end
module_eval <<-EOE, __FILE__, __LINE__ + 1
def #{method}(path, #{'body, ' if has_body}headers)