aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-01-17 15:40:36 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2016-01-17 16:31:12 +0100
commitc10bb2996a441f602ca264a84607692cb3e833c7 (patch)
tree20e9140db332246f8382c5829063619b9bb2cdf9 /actionview
parentbb295be314e7c6d2c26b370209e29eba4b4553c8 (diff)
downloadrails-c10bb2996a441f602ca264a84607692cb3e833c7.tar.gz
rails-c10bb2996a441f602ca264a84607692cb3e833c7.tar.bz2
rails-c10bb2996a441f602ca264a84607692cb3e833c7.zip
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.
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/template/types.rb8
1 files changed, 1 insertions, 7 deletions
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)