#435: rollback some changes

This commit is contained in:
Vokhmin Alexey V 2014-10-22 23:15:08 +04:00
parent 6b6e73b925
commit 1184659c19
1 changed files with 2 additions and 12 deletions

View File

@ -63,16 +63,6 @@ class Issue < ActiveRecord::Base
attr_accessor :new_pull_request 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 def assign_uname
assignee.uname if assignee assignee.uname if assignee
end end
@ -94,12 +84,12 @@ class Issue < ActiveRecord::Base
def set_close(closed_by) def set_close(closed_by)
self.closed_at = Time.now.utc self.closed_at = Time.now.utc
self.closer = closed_by self.closer = closed_by
close(false) # skip the saving self.status = STATUS_CLOSED
end end
def set_open def set_open
self.closed_at = self.closed_by = nil self.closed_at = self.closed_by = nil
reopen(false) # skip the saving self.status = STATUS_REOPEN
end end
def collect_recipients def collect_recipients