diff options
author | José Valim <jose.valim@gmail.com> | 2010-08-26 16:48:04 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-08-26 18:20:14 -0300 |
commit | 737abf25bbafbf501dee4144abf13657217da0d2 (patch) | |
tree | f58a549bbbcdf7d99e595b6aa937d27cf03905cf /actionpack/lib/action_view | |
parent | 818858ac1dbae947f2df0aa61bd4053c518ec909 (diff) | |
download | rails-737abf25bbafbf501dee4144abf13657217da0d2.tar.gz rails-737abf25bbafbf501dee4144abf13657217da0d2.tar.bz2 rails-737abf25bbafbf501dee4144abf13657217da0d2.zip |
Doh, be sure to store the string modification.
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/template.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index b9d5b4e70f..a999a0b7d7 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -1,5 +1,6 @@ require 'active_support/core_ext/array/wrap' require 'active_support/core_ext/object/blank' +require 'active_support/core_ext/object/try' require 'active_support/core_ext/kernel/singleton_class' module ActionView @@ -117,9 +118,7 @@ module ActionView format = details[:format] || :html @formats = Array.wrap(format).map(&:to_sym) - - @virtual_path = details[:virtual_path] - @virtual_path.sub(".#{format}", "") if @virtual_path + @virtual_path = details[:virtual_path].try(:sub, ".#{format}", "") end def render(view, locals, &block) |