- # Check if more statuses are needed
- enum :status => %w[open ignored resolved]
-
- scope :with_status, ->(issue_status) { where(:status => statuses[issue_status]) }
+ scope :with_status, ->(issue_status) { where(:status => issue_status) }
+ scope :visible_to, ->(user) { where(:assigned_role => user.roles.map(&:role)) }