提交 737abf25 编写于 作者: J José Valim

Doh, be sure to store the string modification.

上级 818858ac
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册