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

Merge remote branch 'spastorino/master'

This commit is contained in:
Carl Lerche 2010-04-18 13:04:04 -07:00
commit eb83c9cf42
5 changed files with 6 additions and 15 deletions

View file

@ -63,8 +63,9 @@ module ActionController #:nodoc:
included do
extend ConfigMethods
@@perform_caching = true
cattr_accessor :perform_caching
delegate :perform_caching, :perform_caching=, :to => :config
singleton_class.delegate :perform_caching, :perform_caching=, :to => :config
self.perform_caching = true
end

View file

@ -1,3 +1,4 @@
require 'active_support/core_ext/hash/conversions.rb'
require 'action_dispatch/http/request'
module ActionDispatch

View file

@ -39,7 +39,7 @@ module ActionView
private
# TODO: Create an object that has caching read/write on it
def fragment_for(name = {}, options = nil, &block) #:nodoc:
if controller.class.perform_caching
if controller.perform_caching
if controller.fragment_exist?(name, options)
controller.read_fragment(name, options)
else

View file

@ -4,6 +4,7 @@ require 'models/post'
require 'models/author'
require 'models/tagging'
require 'models/comment'
require 'models/company_in_module'
class XmlSerializationTest < ActiveRecord::TestCase
def test_should_serialize_default_root

View file

@ -1,18 +1,6 @@
require 'benchmark'
class << Benchmark
# Earlier Ruby had a slower implementation.
if RUBY_VERSION < '1.8.7'
remove_method :realtime
def realtime
r0 = Time.now
yield
r1 = Time.now
r1.to_f - r0.to_f
end
end
def ms
1000 * realtime { yield }
end