Created
November 10, 2009 16:39
-
-
Save edavis10/231017 to your computer and use it in GitHub Desktop.
Setting the created_on field
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
issue = Issue.find(100) | |
issue.created_on = 10.days.ago | |
issue.save | |
# Or if you wanted to "create" the issues based on their start_date | |
Issue.all.each do |issue| | |
issue.created_on = issue.start_date | |
issue.save | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment