Skip to content

Commit

Permalink
Doh, be sure to store the string modification.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Aug 26, 2010
1 parent 818858a commit 737abf2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions 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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 737abf2

Please sign in to comment.