From e5ab4b0d07ade8d89d633ca744c0eafbc53ee921 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 31 Jan 2010 18:32:28 -0800 Subject: Convert to class_attribute --- actionpack/lib/abstract_controller/helpers.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/abstract_controller/helpers.rb') diff --git a/actionpack/lib/abstract_controller/helpers.rb b/actionpack/lib/abstract_controller/helpers.rb index eb621c0865..578b884a4d 100644 --- a/actionpack/lib/abstract_controller/helpers.rb +++ b/actionpack/lib/abstract_controller/helpers.rb @@ -1,4 +1,6 @@ require 'active_support/dependencies' +require 'active_support/core_ext/class/attribute' +require 'active_support/core_ext/module/delegation' module AbstractController module Helpers @@ -12,10 +14,10 @@ module AbstractController end included do - extlib_inheritable_accessor(:_helpers) { Module.new } - extlib_inheritable_accessor(:_helper_serial) do - AbstractController::Helpers.next_serial - end + class_attribute :_helpers, :_helper_serial + delegate :_helpers, :to => :'self.class' + self._helpers = Module.new + self._helper_serial = ::AbstractController::Helpers.next_serial end module ClassMethods -- cgit v1.2.3