aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-01-17 15:54:16 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2016-01-17 16:31:13 +0100
commitb1dcfa782e64859f9d03b6cf9474506ac5129337 (patch)
treec431a0e278ef61f86afe54309f3218ec4c90043a /actionview
parentc10bb2996a441f602ca264a84607692cb3e833c7 (diff)
downloadrails-b1dcfa782e64859f9d03b6cf9474506ac5129337.tar.gz
rails-b1dcfa782e64859f9d03b6cf9474506ac5129337.tar.bz2
rails-b1dcfa782e64859f9d03b6cf9474506ac5129337.zip
Replace class attribute with SET constant.
We'll be using this to map over to Action Dispatch's Mime::Set.
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/template/types.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/actionview/lib/action_view/template/types.rb b/actionview/lib/action_view/template/types.rb
index 44a3da934f..4a64467ce9 100644
--- a/actionview/lib/action_view/template/types.rb
+++ b/actionview/lib/action_view/template/types.rb
@@ -5,13 +5,12 @@ module ActionView
class Template
class Types
class Type
- cattr_accessor :types
- self.types = Set.new([ :html, :text, :js, :css, :xml, :json ])
+ SET = Set.new([ :html, :text, :js, :css, :xml, :json ])
def self.[](type)
return type if type.is_a?(self)
- if type.is_a?(Symbol) || types.member?(type.to_s)
+ if type.is_a?(Symbol) || SET.member?(type.to_s)
new(type)
end
end