Commit f7ea649f authored by Sytse Sijbrandij's avatar Sytse Sijbrandij

Implement (style) suggestions.

parent 6637c1e4
......@@ -28,8 +28,8 @@ 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 :assigned, where("assignee_id IS NOT NULL")
scope :unassigned, where("assignee_id IS NULL")
scope :assigned, -> { where("assignee_id IS NOT NULL") }
scope :unassigned, -> { where("assignee_id IS NULL") }
state_machine :state, initial: :opened do
event :close do
......
......@@ -56,9 +56,9 @@
.row
=render(partial: 'issues', :locals => {title: 'Unstarted Issues (open and unassigned)', issues: @issues.opened.unassigned})
= render(partial: 'issues', locals: {title: 'Unstarted Issues (open and unassigned)', issues: @issues.opened.unassigned})
=render(partial: 'issues', :locals => {title: 'Ongoing Issues (open and assigned)', issues: @issues.opened.assigned})
= render(partial: 'issues', locals: {title: 'Ongoing Issues (open and assigned)', issues: @issues.opened.assigned})
.row
.span6
......@@ -75,7 +75,7 @@
&ndash;
= link_to_gfm truncate(merge_request.title, length: 60), [@project, merge_request]
=render(:partial => 'issues', :locals => {title: 'Completed Issues (closed)', issues: @issues.closed})
= render(:partial => 'issues', locals: {title: 'Completed Issues (closed)', issues: @issues.closed})
%hr
%h6 Participants:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment