aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib
diff options
context:
space:
mode:
authorTarmo Tänav <tarmo@itech.ee>2008-08-23 17:40:16 +0300
committerTarmo Tänav <tarmo@itech.ee>2008-08-23 17:43:52 +0300
commitb5c4c7daf8e26e829ec4d7ece91f622d9e1a49fa (patch)
treed51a029ae62a2ac097e366f45d44f5aedf2ea385 /activeresource/lib
parente48e77e0222292176cd9f68658dd54524f582d9b (diff)
downloadrails-b5c4c7daf8e26e829ec4d7ece91f622d9e1a49fa.tar.gz
rails-b5c4c7daf8e26e829ec4d7ece91f622d9e1a49fa.tar.bz2
rails-b5c4c7daf8e26e829ec4d7ece91f622d9e1a49fa.zip
Clear prefix_parameters cache when setting prefix
Diffstat (limited to 'activeresource/lib')
-rw-r--r--activeresource/lib/active_resource/base.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
index 7e4a75aa70..4af30ea13f 100644
--- a/activeresource/lib/active_resource/base.rb
+++ b/activeresource/lib/active_resource/base.rb
@@ -356,6 +356,9 @@ module ActiveResource
# Replace :placeholders with '#{embedded options[:lookups]}'
prefix_call = value.gsub(/:\w+/) { |key| "\#{options[#{key}]}" }
+ # Clear prefix parameters in case they have been cached
+ @prefix_parameters = nil
+
# Redefine the new methods.
code = <<-end_code
def prefix_source() "#{value}" end