aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/template/text.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/lib/action_view/template/text.rb')
-rw-r--r--actionview/lib/action_view/template/text.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/actionview/lib/action_view/template/text.rb b/actionview/lib/action_view/template/text.rb
index 898593e702..380528d6ef 100644
--- a/actionview/lib/action_view/template/text.rb
+++ b/actionview/lib/action_view/template/text.rb
@@ -4,19 +4,16 @@ module ActionView #:nodoc:
class Text #:nodoc:
attr_accessor :type
- def initialize(string, type = nil)
+ def initialize(string)
@string = string.to_s
- @type = Types[type] || type if type
- @type ||= Types[:text]
+ @type = Types[:text]
end
def identifier
"text template"
end
- def inspect
- "text template"
- end
+ alias_method :inspect, :identifier
def to_str
@string
@@ -27,7 +24,7 @@ module ActionView #:nodoc:
end
def formats
- [@type.respond_to?(:ref) ? @type.ref : @type.to_s]
+ [@type.ref]
end
end
end