Ruby on Rails: What are partial hash arguments and full set arguments?
Posted
by williamjones
on Stack Overflow
See other posts from Stack Overflow
or by williamjones
Published on 2010-03-10T07:09:27Z
Indexed on
2010/03/12
11:47 UTC
Read the original article
Hit count: 347
ruby-on-rails
|partial-hash-arguments
|full-set-arguments
|assert-redirected-to
|deprecated
I'm using asserts_redirected_to in my unit tests, and I'm receiving this warning:
DEPRECATION WARNING: Using assert_redirected_to with partial hash arguments is deprecated. Specify the full set arguments instead.
What is a partial hash argument, and what is a full set argument? These aren't terms that I've seen used in the Rails community before, and the only relevant results I can find on Google for these are in reference to this deprecation warning.
Here is my code:
assert_redirected_to :controller => :user, :action => :search
also tried:
assert_redirected_to({:controller => :user, :action => :search})
I might have guessed that it feels I'm missing some parameters or something like that, but the API documentation explicitly says that not all parameters need to be included:
http://rails.rubyonrails.org/classes/ActionController/Assertions/ResponseAssertions.html
© Stack Overflow or respective owner