Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Doh, be sure to store the string modification.

  • Loading branch information...
commit 737abf25bbafbf501dee4144abf13657217da0d2 1 parent 818858a
@josevalim josevalim authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 actionpack/lib/action_view/template.rb
View
5 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 @@ def initialize(source, identifier, handler, details)
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)
Please sign in to comment.
Something went wrong with that request. Please try again.