created :time option for touch #18956
Actually there is: keyword arguments:
def touch(*names, time: nil) if time # ... end end
Alternatively, you can use Array#extract_options!, which active support adds to the core Array class:
def touch(*names) options = names.extract_options! if options[:time] # ... end end
This is looking great @hjoo - we need a couple more items to make this PR complete.
Please add an entry to the Active Record CHANGELOG.md noting that you can now set a time in
@hjoo I know we didn't go over this at the Open Academy hackathon - Commit messages should be 50 characters and additional description should be after that. So a better commit message would be:
The idea being that GitHub could go away tomorrow but your commit messages are forever. Updating the changelog doesn't need to be noted, btw. Also, now someone knows what this change is doing without going to github.
To update the commit message you can do:
After editing and saving the new commit message force push again to your branch.