mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
adds missing requires for Object#try
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
require 'active_support/core_ext/object/try'
|
||||
require 'action_controller/vendor/html-scanner'
|
||||
require 'action_view/helpers/tag_helper'
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
require 'active_support/core_ext/object/try'
|
||||
require 'abstract_unit'
|
||||
|
||||
class ResourcesController < ActionController::Base
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
require 'active_support/core_ext/object/blank'
|
||||
require 'active_support/core_ext/object/try'
|
||||
|
||||
module ActiveRecord
|
||||
module Calculations
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user