1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

adds missing requires for Object#try

This commit is contained in:
Xavier Noria 2010-08-09 15:14:00 +02:00
parent 505546af70
commit 4f7565c4de
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)