[refs #90] add state setter

This commit is contained in:
Alexander Machehin 2012-05-10 15:42:25 +06:00
parent 381ae0a8b9
commit d4a5b78b21
1 changed files with 5 additions and 2 deletions

View File

@ -40,6 +40,10 @@ class PullRequest < ActiveRecord::Base
end
end
def state=(value)
issue.state = value
end
def can_merge?
state == 'ready'
end
@ -55,8 +59,7 @@ class PullRequest < ActiveRecord::Base
system("cd #{path} && git reset --hard HEAD")
block
else
puts "ret is #{ret}"
raise
raise ret
end
end