From 01f032f256f96f65e154061b582fbb4b32e4a692 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Wed, 20 May 2009 15:33:08 -0700 Subject: Added responds_to to new base. --- actionpack/lib/action_view/template/text.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/template/text.rb') diff --git a/actionpack/lib/action_view/template/text.rb b/actionpack/lib/action_view/template/text.rb index a777021a12..927a0d7a72 100644 --- a/actionpack/lib/action_view/template/text.rb +++ b/actionpack/lib/action_view/template/text.rb @@ -1,11 +1,16 @@ module ActionView #:nodoc: class TextTemplate < String #:nodoc: + def initialize(string, content_type = Mime[:html]) + super(string) + @content_type = Mime[content_type] + end + def identifier() self end def render(*) self end - def mime_type() Mime::HTML end + def mime_type() @content_type end def partial?() false end end -- cgit v1.2.3