diff options
author | José Valim <jose.valim@gmail.com> | 2010-10-10 14:47:11 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-10-10 14:47:11 +0200 |
commit | 49b6f33f99a28d68f18203a696fb47854a9085d2 (patch) | |
tree | 4695f8b563d682ad3fb78d12ebfb547f378043eb /actionpack/lib/action_view/helpers | |
parent | 11aa5157355d06ddbc9cad8fd0aa43a75ac8431e (diff) | |
download | rails-49b6f33f99a28d68f18203a696fb47854a9085d2.tar.gz rails-49b6f33f99a28d68f18203a696fb47854a9085d2.tar.bz2 rails-49b6f33f99a28d68f18203a696fb47854a9085d2.zip |
Clean up unused methods from AV::Base and pass in the template object on rendering.
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/translation_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/translation_helper.rb b/actionpack/lib/action_view/helpers/translation_helper.rb index 13767a09f9..8574ca6595 100644 --- a/actionpack/lib/action_view/helpers/translation_helper.rb +++ b/actionpack/lib/action_view/helpers/translation_helper.rb @@ -45,8 +45,8 @@ module ActionView private def scope_key_by_partial(key) if key.to_s.first == "." - if @_virtual_path - @_virtual_path.gsub(%r{/_?}, ".") + key.to_s + if (path = @_template && @_template.virtual_path) + path.gsub(%r{/_?}, ".") + key.to_s else raise "Cannot use t(#{key.inspect}) shortcut because path is not available" end |