diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-22 22:50:44 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-22 22:50:44 +0000 |
commit | d91405a415819a626427373437e0929b19914cf4 (patch) | |
tree | 55b9ffef39c7d782d664b9bd2bb7b100e321bd29 /actionpack/lib | |
parent | a89e36a22a558a77e6783d21ce4f9deee028e2e9 (diff) | |
download | rails-d91405a415819a626427373437e0929b19914cf4.tar.gz rails-d91405a415819a626427373437e0929b19914cf4.tar.bz2 rails-d91405a415819a626427373437e0929b19914cf4.zip |
Fixed UrlHelper#link_to_unless so it doesn't care if the id is a string or fixnum [zenspider]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@256 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/tag_helper.rb | 1 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/url_helper.rb | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb index bf81d5d909..e7c74bc958 100644 --- a/actionpack/lib/action_view/helpers/tag_helper.rb +++ b/actionpack/lib/action_view/helpers/tag_helper.rb @@ -1,4 +1,5 @@ require 'cgi' +require 'erb' module ActionView module Helpers diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 127c7a42d5..098fce8100 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -96,9 +96,9 @@ module ActionView def destination_equal_to_current(options) params_without_location = @params.reject { |key, value| %w( controller action id ).include?(key) } - options[:action] == @params['action'] && - options[:id] == @params['id'] && - options[:controller] == @params['controller'] && + options[:action].to_s == @params['action'].to_s && + options[:id].to_s == @params['id'].to_s && + options[:controller].to_s == @params['controller'].to_s && (options.has_key?(:params) ? params_without_location == options[:params] : true) end @@ -120,4 +120,4 @@ module ActionView end end end -end
\ No newline at end of file +end |