Skip to content
This repository
Browse code

added :prefixes accessor to LookupContext.

  • Loading branch information...
commit 37f448e05e411cb07e829a0d93f6a83ee95ccdf3 1 parent bff3740
Nick Sutterer authored May 03, 2011
2  actionpack/lib/action_view/lookup_context.rb
@@ -9,6 +9,8 @@ module ActionView
9 9
   # generate a key, given to view paths, used in the resolver cache lookup. Since
10 10
   # this key is generated just once during the request, it speeds up all cache accesses.
11 11
   class LookupContext #:nodoc:
  12
+    attr_accessor :prefixes
  13
+    
12 14
     mattr_accessor :fallbacks
13 15
     @@fallbacks = FallbackFileSystemResolver.instances
14 16
 
6  actionpack/test/template/lookup_context_test.rb
@@ -180,6 +180,12 @@ def teardown
180 180
 
181 181
     assert_not_equal template, old_template
182 182
   end
  183
+  
  184
+  test "responds to #prefixes" do
  185
+    assert_equal nil, @lookup_context.prefixes
  186
+    @lookup_context.prefixes = ["foo"]
  187
+    assert_equal ["foo"], @lookup_context.prefixes
  188
+  end
183 189
 end
184 190
 
185 191
 class LookupContextWithFalseCaching < ActiveSupport::TestCase

0 notes on commit 37f448e

Please sign in to comment.
Something went wrong with that request. Please try again.