Browse files

added :prefixes accessor to LookupContext.

  • Loading branch information...
1 parent bff3740 commit 37f448e05e411cb07e829a0d93f6a83ee95ccdf3 @apotonick apotonick committed May 3, 2011
Showing with 8 additions and 0 deletions.
  1. +2 −0 actionpack/lib/action_view/lookup_context.rb
  2. +6 −0 actionpack/test/template/lookup_context_test.rb
View
2 actionpack/lib/action_view/lookup_context.rb
@@ -9,6 +9,8 @@ module ActionView
# generate a key, given to view paths, used in the resolver cache lookup. Since
# this key is generated just once during the request, it speeds up all cache accesses.
class LookupContext #:nodoc:
+ attr_accessor :prefixes
+
mattr_accessor :fallbacks
@@fallbacks = FallbackFileSystemResolver.instances
View
6 actionpack/test/template/lookup_context_test.rb
@@ -180,6 +180,12 @@ def teardown
assert_not_equal template, old_template
end
+
+ test "responds to #prefixes" do
+ assert_equal nil, @lookup_context.prefixes
+ @lookup_context.prefixes = ["foo"]
+ assert_equal ["foo"], @lookup_context.prefixes
+ end
end
class LookupContextWithFalseCaching < ActiveSupport::TestCase

0 comments on commit 37f448e

Please sign in to comment.