Permalink
Browse files

Oops, dup the options

  • Loading branch information...
1 parent cce2b26 commit cf79a7dda0c55c14fb393aa6fb0d6a6f91301fad @UnderpantsGnome committed Apr 10, 2007
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/rails_extensions.rb
@@ -52,8 +52,9 @@ def back_link(text='Back', *args)
def current_controller?(*options)
options = options[1] if options.is_a?(Array)
return false unless options.useful? || options.is_a?(Hash)
- options[:action] = :index
- url_for({:action => :index}) == url_for(options)
+ opts = options.dup
+ opts[:action] = :index
+ url_for({:action => :index}) == url_for(opts)
end
end
end

0 comments on commit cf79a7d

Please sign in to comment.