diff options
author | Xavier Noria <fxn@hashref.com> | 2010-07-26 18:57:02 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-07-26 18:57:02 +0200 |
commit | b31c0ae306cf4357304fd7fe8130480f336590f9 (patch) | |
tree | d28f1c4611da7a9edd5d2ec56ddd03752efbc33e /activeresource/lib | |
parent | 79f9fcd70d9c15f63f62fb04a46996ae29769937 (diff) | |
parent | c819c131f2d08a8c9089a6ef0dcadcf912e2538c (diff) | |
download | rails-b31c0ae306cf4357304fd7fe8130480f336590f9.tar.gz rails-b31c0ae306cf4357304fd7fe8130480f336590f9.tar.bz2 rails-b31c0ae306cf4357304fd7fe8130480f336590f9.zip |
Merge remote branch 'rails/master'
Diffstat (limited to 'activeresource/lib')
-rw-r--r-- | activeresource/lib/active_resource/base.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index 1557e090e1..72ad2f5872 100644 --- a/activeresource/lib/active_resource/base.rb +++ b/activeresource/lib/active_resource/base.rb @@ -577,7 +577,7 @@ module ActiveResource # Default value is <tt>site.path</tt>. def prefix=(value = '/') # Replace :placeholders with '#{embedded options[:lookups]}' - prefix_call = value.gsub(/:\w+/) { |key| "\#{options[#{key}]}" } + prefix_call = value.gsub(/:\w+/) { |key| "\#{URI.escape options[#{key}].to_s}" } # Clear prefix parameters in case they have been cached @prefix_parameters = nil @@ -622,7 +622,7 @@ module ActiveResource # def element_path(id, prefix_options = {}, query_options = nil) prefix_options, query_options = split_options(prefix_options) if query_options.nil? - "#{prefix(prefix_options)}#{collection_name}/#{id}.#{format.extension}#{query_string(query_options)}" + "#{prefix(prefix_options)}#{collection_name}/#{URI.escape id.to_s}.#{format.extension}#{query_string(query_options)}" end # Gets the new element path for REST resources. |