Commit f7ea649f4b409d5561b2bd81e46863a1f0c77e1b

Authored by Sytse Sijbrandij
1 parent 6637c1e4

Implement (style) suggestions.

app/models/issue.rb
... ... @@ -28,8 +28,8 @@ class Issue < ActiveRecord::Base
28 28 scope :cared, ->(user) { where(assignee_id: user) }
29 29 scope :authored, ->(user) { where(author_id: user) }
30 30 scope :open_for, ->(user) { opened.assigned(user) }
31   - scope :assigned, where("assignee_id IS NOT NULL")
32   - scope :unassigned, where("assignee_id IS NULL")
  31 + scope :assigned, -> { where("assignee_id IS NOT NULL") }
  32 + scope :unassigned, -> { where("assignee_id IS NULL") }
33 33  
34 34 state_machine :state, initial: :opened do
35 35 event :close do
... ...
app/views/milestones/show.html.haml
... ... @@ -56,9 +56,9 @@
56 56  
57 57  
58 58 .row
59   - =render(partial: 'issues', :locals => {title: 'Unstarted Issues (open and unassigned)', issues: @issues.opened.unassigned})
  59 + = render(partial: 'issues', locals: {title: 'Unstarted Issues (open and unassigned)', issues: @issues.opened.unassigned})
60 60  
61   - =render(partial: 'issues', :locals => {title: 'Ongoing Issues (open and assigned)', issues: @issues.opened.assigned})
  61 + = render(partial: 'issues', locals: {title: 'Ongoing Issues (open and assigned)', issues: @issues.opened.assigned})
62 62  
63 63 .row
64 64 .span6
... ... @@ -75,7 +75,7 @@
75 75 –
76 76 = link_to_gfm truncate(merge_request.title, length: 60), [@project, merge_request]
77 77  
78   - =render(:partial => 'issues', :locals => {title: 'Completed Issues (closed)', issues: @issues.closed})
  78 + = render(:partial => 'issues', locals: {title: 'Completed Issues (closed)', issues: @issues.closed})
79 79  
80 80 %hr
81 81 %h6 Participants:
... ...