Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (30 sloc) 564 Bytes
module ActionView #:nodoc:
class TextTemplate < String #:nodoc:
HTML = Mime[:html]
def initialize(string, content_type = HTML)
super(string.to_s)
@content_type = Mime[content_type] || content_type
end
def details
{:formats => [@content_type.to_sym]}
end
def identifier
self
end
def inspect
'inline template'
end
def render(*args)
self
end
def mime_type
@content_type
end
def formats
[mime_type]
end
def partial?
false
end
end
end
Jump to Line
Something went wrong with that request. Please try again.