From c10bb2996a441f602ca264a84607692cb3e833c7 Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Sun, 17 Jan 2016 15:40:36 +0100 Subject: Remove register abstraction. The template types is a private abstraction to fill in basic blanks from Action Dispatch's mime types. As such we can modify the data structure ourselves. --- actionview/lib/action_view/template/types.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view/template/types.rb b/actionview/lib/action_view/template/types.rb index 8ba5a48aef..44a3da934f 100644 --- a/actionview/lib/action_view/template/types.rb +++ b/actionview/lib/action_view/template/types.rb @@ -6,13 +6,7 @@ module ActionView class Types class Type cattr_accessor :types - self.types = Set.new - - def self.register(*t) - types.merge(t.map(&:to_s)) - end - - register :html, :text, :js, :css, :xml, :json + self.types = Set.new([ :html, :text, :js, :css, :xml, :json ]) def self.[](type) return type if type.is_a?(self) -- cgit v1.2.3