From 1184659c19e0b3fcea8dd3d7ae8de5ff9da618ef Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Wed, 22 Oct 2014 23:15:08 +0400 Subject: [PATCH] #435: rollback some changes --- app/models/issue.rb | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index 23f591d23..364d6a5fd 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -63,16 +63,6 @@ class Issue < ActiveRecord::Base attr_accessor :new_pull_request - state_machine :status, initial: :open do - event :reopen do - transition closed: :reopen - end - - event :close do - transition [:open, :reopen] => :closed - end - end - def assign_uname assignee.uname if assignee end @@ -94,12 +84,12 @@ class Issue < ActiveRecord::Base def set_close(closed_by) self.closed_at = Time.now.utc self.closer = closed_by - close(false) # skip the saving + self.status = STATUS_CLOSED end def set_open self.closed_at = self.closed_by = nil - reopen(false) # skip the saving + self.status = STATUS_REOPEN end def collect_recipients