diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-01-31 18:32:28 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-02-01 02:02:42 -0800 |
commit | e5ab4b0d07ade8d89d633ca744c0eafbc53ee921 (patch) | |
tree | aa2480b38f79e623b98da0274695f99db73bff20 /actionpack/lib/abstract_controller/layouts.rb | |
parent | 8ae25a8e41168801590fdb95891cc5990b4db21c (diff) | |
download | rails-e5ab4b0d07ade8d89d633ca744c0eafbc53ee921.tar.gz rails-e5ab4b0d07ade8d89d633ca744c0eafbc53ee921.tar.bz2 rails-e5ab4b0d07ade8d89d633ca744c0eafbc53ee921.zip |
Convert to class_attribute
Diffstat (limited to 'actionpack/lib/abstract_controller/layouts.rb')
-rw-r--r-- | actionpack/lib/abstract_controller/layouts.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/lib/abstract_controller/layouts.rb b/actionpack/lib/abstract_controller/layouts.rb index 56ddf9bf01..0d214396aa 100644 --- a/actionpack/lib/abstract_controller/layouts.rb +++ b/actionpack/lib/abstract_controller/layouts.rb @@ -1,3 +1,6 @@ +require 'active_support/core_ext/class/attribute' +require 'active_support/core_ext/module/delegation' + module AbstractController # Layouts reverse the common pattern of including shared headers and footers in many templates to isolate changes in # repeated setups. The inclusion pattern has pages that look like this: @@ -161,8 +164,9 @@ module AbstractController include Rendering included do - extlib_inheritable_accessor(:_layout_conditions) { Hash.new } - extlib_inheritable_accessor(:_action_has_layout) { Hash.new } + class_attribute :_layout_conditions + delegate :_layout_conditions, :to => :'self.class' + self._layout_conditions = {} _write_layout_method end |