aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template/text.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-09-24 12:30:13 -0500
committerJoshua Peek <josh@joshpeek.com>2009-09-24 12:30:13 -0500
commit610b81beca461a6fa4f00c7023e0e4315eb2b8be (patch)
tree520484e6d2943695a9cb55403bc77f6b8336abfc /actionpack/lib/action_view/template/text.rb
parent9f96708f53b4eee8830554dd8f0a482160ef4c73 (diff)
downloadrails-610b81beca461a6fa4f00c7023e0e4315eb2b8be.tar.gz
rails-610b81beca461a6fa4f00c7023e0e4315eb2b8be.tar.bz2
rails-610b81beca461a6fa4f00c7023e0e4315eb2b8be.zip
Clean up log output for rendered templates
Diffstat (limited to 'actionpack/lib/action_view/template/text.rb')
-rw-r--r--actionpack/lib/action_view/template/text.rb29
1 files changed, 21 insertions, 8 deletions
diff --git a/actionpack/lib/action_view/template/text.rb b/actionpack/lib/action_view/template/text.rb
index 9f12e5e0a8..f7d0df5ba0 100644
--- a/actionpack/lib/action_view/template/text.rb
+++ b/actionpack/lib/action_view/template/text.rb
@@ -1,6 +1,5 @@
module ActionView #:nodoc:
class TextTemplate < String #:nodoc:
-
def initialize(string, content_type = Mime[:html])
super(string.to_s)
@content_type = Mime[content_type] || content_type
@@ -10,14 +9,28 @@ module ActionView #:nodoc:
{:formats => [@content_type.to_sym]}
end
- def identifier() self end
-
- def render(*) self end
-
- def mime_type() @content_type end
+ def identifier
+ self
+ end
+
+ def inspect
+ 'inline template'
+ end
+
+ def render(*args)
+ self
+ end
- def formats() [mime_type] end
+ def mime_type
+ @content_type
+ end
- def partial?() false end
+ def formats
+ [mime_type]
+ end
+
+ def partial?
+ false
+ end
end
end