diff options
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/template/types.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionview/lib/action_view/template/types.rb b/actionview/lib/action_view/template/types.rb index 4a64467ce9..650023f6c5 100644 --- a/actionview/lib/action_view/template/types.rb +++ b/actionview/lib/action_view/template/types.rb @@ -8,9 +8,9 @@ module ActionView SET = Set.new([ :html, :text, :js, :css, :xml, :json ]) def self.[](type) - return type if type.is_a?(self) - - if type.is_a?(Symbol) || SET.member?(type.to_s) + if type.is_a?(self) + type + else new(type) end end |