diff options
author | José Valim <jose.valim@gmail.com> | 2011-09-22 15:06:04 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-09-22 15:06:04 +0200 |
commit | c3fa2e9bf89039e90c45336979d17cb0c02a6cd2 (patch) | |
tree | d90d4eb10b2aabb667400ec24b744a4d1101bfee /actionpack | |
parent | 119e9e2dafb0cdc5b85613b730333679aef534af (diff) | |
download | rails-c3fa2e9bf89039e90c45336979d17cb0c02a6cd2.tar.gz rails-c3fa2e9bf89039e90c45336979d17cb0c02a6cd2.tar.bz2 rails-c3fa2e9bf89039e90c45336979d17cb0c02a6cd2.zip |
Make handlers a registered detail.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/lookup_context.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/actionpack/lib/action_view/lookup_context.rb b/actionpack/lib/action_view/lookup_context.rb index 8267977830..ef1ef44317 100644 --- a/actionpack/lib/action_view/lookup_context.rb +++ b/actionpack/lib/action_view/lookup_context.rb @@ -44,8 +44,9 @@ module ActionView module Accessors #:nodoc: end - register_detail(:formats) { Mime::SET.symbols } register_detail(:locale) { [I18n.locale, I18n.default_locale] } + register_detail(:formats) { Mime::SET.symbols } + register_detail(:handlers){ Template::Handlers.extensions } class DetailsKey #:nodoc: alias :eql? :equal? @@ -159,10 +160,6 @@ module ActionView return name, prefixes end - def default_handlers #:nodoc: - @@default_handlers ||= Template::Handlers.extensions - end - def handlers_regexp #:nodoc: @@handlers_regexp ||= /\.(?:#{default_handlers.join('|')})$/ end @@ -173,7 +170,7 @@ module ActionView include ViewPaths def initialize(view_paths, details = {}, prefixes = []) - @details, @details_key = { :handlers => default_handlers }, nil + @details, @details_key = {}, nil @frozen_formats, @skip_default_locale = false, false @cache = true @prefixes = prefixes |