Permalink
Browse files

Make handlers a registered detail.

  • Loading branch information...
josevalim committed Sep 22, 2011
1 parent 119e9e2 commit c3fa2e9bf89039e90c45336979d17cb0c02a6cd2
Showing with 3 additions and 6 deletions.
  1. +3 −6 actionpack/lib/action_view/lookup_context.rb
@@ -44,8 +44,9 @@ def initialize_details(details)
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 @@ def normalize_name(name, prefixes) #:nodoc:
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 @@ def handlers_regexp #:nodoc:
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

0 comments on commit c3fa2e9

Please sign in to comment.