aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template/text.rb
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-05-20 15:33:08 -0700
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-05-20 15:34:26 -0700
commit01f032f256f96f65e154061b582fbb4b32e4a692 (patch)
tree9d9d0deeeec9a8c86c0b85c55c3ed13385f55f49 /actionpack/lib/action_view/template/text.rb
parentc03b0ca7eb7e73587005e1440bf90cd01ed10aa5 (diff)
downloadrails-01f032f256f96f65e154061b582fbb4b32e4a692.tar.gz
rails-01f032f256f96f65e154061b582fbb4b32e4a692.tar.bz2
rails-01f032f256f96f65e154061b582fbb4b32e4a692.zip
Added responds_to to new base.
Diffstat (limited to 'actionpack/lib/action_view/template/text.rb')
-rw-r--r--actionpack/lib/action_view/template/text.rb7
1 files changed, 6 insertions, 1 deletions
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