aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/template/types.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/lib/action_view/template/types.rb')
-rw-r--r--actionview/lib/action_view/template/types.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionview/lib/action_view/template/types.rb b/actionview/lib/action_view/template/types.rb
index 650023f6c5..f423399c30 100644
--- a/actionview/lib/action_view/template/types.rb
+++ b/actionview/lib/action_view/template/types.rb
@@ -5,7 +5,7 @@ module ActionView
class Template
class Types
class Type
- SET = Set.new([ :html, :text, :js, :css, :xml, :json ])
+ SET = Struct.new(:symbols).new(Set.new([ :html, :text, :js, :css, :xml, :json ]))
def self.[](type)
if type.is_a?(self)
@@ -47,6 +47,10 @@ module ActionView
def self.[](type)
type_klass[type]
end
+
+ def symbols
+ type_klass::SET.symbols
+ end
end
end
end