Skip to content

Instantly share code, notes, and snippets.

@plainprogrammer plainprogrammer/task.rb Secret
Created Aug 29, 2017

Embed
What would you like to do?
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
You can’t perform that action at this time.