Fix Issue.open_for

This commit is contained in:
Dmitriy Zaporozhets 2013-06-17 13:29:50 +03:00
parent ed9b661c9d
commit 68b601f6af

View file

@ -27,7 +27,7 @@ class Issue < ActiveRecord::Base
scope :cared, ->(user) { where(assignee_id: user) }
scope :authored, ->(user) { where(author_id: user) }
scope :open_for, ->(user) { opened.assigned(user) }
scope :open_for, ->(user) { opened.assigned_to(user) }
state_machine :state, initial: :opened do
event :close do