-
-
Save jonhoman/761317 to your computer and use it in GitHub Desktop.
Why is to_s needed?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts build_date | |
# Sun Dec 19 10:35:26 -0600 2010 | |
puts build_date.class | |
# Time | |
# This works | |
feed.update_attributes!(:name => name, :last_build_date => build_date.to_s) | |
# This fails with wrong number of arguments (1 for 0) | |
feed.update_attributes!(:name => name, :last_build_date => build_date) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not much in the stacktrace:
Failure/Error: FeedWorker.perform(feed.id)
wrong number of arguments (1 for 0)
./app/workers/feed_worker.rb:21:in `perform'
./spec/workers/feed_worker_spec.rb:7