aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-09-22 15:06:04 +0200
committerJosé Valim <jose.valim@gmail.com>2011-09-22 15:06:04 +0200
commitc3fa2e9bf89039e90c45336979d17cb0c02a6cd2 (patch)
treed90d4eb10b2aabb667400ec24b744a4d1101bfee /actionpack
parent119e9e2dafb0cdc5b85613b730333679aef534af (diff)
downloadrails-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.rb9
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