Ruby on Rails Saturday, July 31, 2010

Hey everybody,

I'm trying to test a little piece of code I wrote, and I get the
following error:

Exception: can't dup Symbol

It happens in the following line: try_to_login @valid_user, :remember_me
=> "1",
where the function try_to_login is:

def try_to_login(user, options = {})
user_hash = {:screen_name => user.screen_name, :password =>
user.password}
user_hash.merge!(options)
post :login, :user => :user_hash
assert logged_in?
end

I can't isolate the error, can anybody throw some light on it?

Thanks a lot in advance!
--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment