diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-12-02 16:42:37 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-12-02 16:42:37 -0500 |
commit | 45f8848ca7d7a1065c4c9f3d73946d908a382a9d (patch) | |
tree | c541295a82ca80ff38f256a095e576fc238c706f /actionview/lib | |
parent | 8ce903af862d56b77d60c3809c0442cdac9d6c89 (diff) | |
download | rails-45f8848ca7d7a1065c4c9f3d73946d908a382a9d.tar.gz rails-45f8848ca7d7a1065c4c9f3d73946d908a382a9d.tar.bz2 rails-45f8848ca7d7a1065c4c9f3d73946d908a382a9d.zip |
Remove unused argument
Now Text class is only used to render text mime type pages
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/template/text.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/actionview/lib/action_view/template/text.rb b/actionview/lib/action_view/template/text.rb index e8d4e18f04..380528d6ef 100644 --- a/actionview/lib/action_view/template/text.rb +++ b/actionview/lib/action_view/template/text.rb @@ -4,10 +4,9 @@ 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 @@ -25,7 +24,7 @@ module ActionView #:nodoc: end def formats - [@type.respond_to?(:ref) ? @type.ref : @type.to_s] + [@type.ref] end end end |