diff options
author | Yehuda Katz and Carl Lerche <wycats@gmail.com> | 2009-04-07 14:57:18 -0700 |
---|---|---|
committer | Yehuda Katz and Carl Lerche <wycats@gmail.com> | 2009-04-07 14:57:18 -0700 |
commit | c1aa5b0e14cd4bd27a5d8bd85cf7c36fa5911830 (patch) | |
tree | c4d08a6227e5a39cb65726fa40c2c54516068d24 /actionpack/lib/action_controller/abstract/renderer.rb | |
parent | 9c8eaf8e254cf8ccaa6ecae3fdf1f468fbb60db8 (diff) | |
download | rails-c1aa5b0e14cd4bd27a5d8bd85cf7c36fa5911830.tar.gz rails-c1aa5b0e14cd4bd27a5d8bd85cf7c36fa5911830.tar.bz2 rails-c1aa5b0e14cd4bd27a5d8bd85cf7c36fa5911830.zip |
Add depends_on, use, and setup to abstract up ideas about module inheritance.
Diffstat (limited to 'actionpack/lib/action_controller/abstract/renderer.rb')
-rw-r--r-- | actionpack/lib/action_controller/abstract/renderer.rb | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/actionpack/lib/action_controller/abstract/renderer.rb b/actionpack/lib/action_controller/abstract/renderer.rb index 5daade6109..68c3b07b84 100644 --- a/actionpack/lib/action_controller/abstract/renderer.rb +++ b/actionpack/lib/action_controller/abstract/renderer.rb @@ -2,20 +2,16 @@ require "action_controller/abstract/logger" module AbstractController module Renderer + depends_on AbstractController::Logger - def self.included(klass) - klass.class_eval do - extend ClassMethods - - attr_internal :formats - - extlib_inheritable_accessor :_view_paths - - self._view_paths ||= ActionView::PathSet.new - include AbstractController::Logger - end + setup do + attr_internal :formats + + extlib_inheritable_accessor :_view_paths + + self._view_paths ||= ActionView::PathSet.new end - + def _action_view @_action_view ||= ActionView::Base.new(self.class.view_paths, {}, self) end |