Issues can be unassigned now

This commit is contained in:
randx 2012-06-26 21:47:25 +03:00
parent 6abc649590
commit 88c625e3f7
8 changed files with 29 additions and 17 deletions

View file

@ -11,7 +11,6 @@ class Issue < ActiveRecord::Base
attr_accessor :author_id_of_changes
validates_presence_of :project_id
validates_presence_of :assignee_id
validates_presence_of :author_id
delegate :name,
@ -22,6 +21,7 @@ class Issue < ActiveRecord::Base
delegate :name,
:email,
:to => :assignee,
:allow_nil => true,
:prefix => true
validates :title,
@ -56,6 +56,10 @@ class Issue < ActiveRecord::Base
today? && created_at == updated_at
end
def is_assigned?
!!assignee_id
end
def is_being_reassigned?
assignee_id_changed?
end