-
-
Save plainprogrammer/3faeab94b0dd5b09eb8a2ef48af2ba45 to your computer and use it in GitHub Desktop.
This file contains 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
class Task < ActiveRecord::Base | |
has_many :task_actions | |
has_many :feed_items | |
def reset | |
update started_at: DateTime.now, completed_at: nil, failed_at: nil | |
task_actions.destroy_all | |
feed_items.each &:reset_completed | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment