Commit 7c200ee1 authored by Sean Arnold's avatar Sean Arnold

Use status_name instead of human_status_name

parent 9a0073c7
...@@ -102,8 +102,8 @@ module TodosHelper ...@@ -102,8 +102,8 @@ module TodosHelper
end end
content_tag(:span, nil, class: 'target-status') do content_tag(:span, nil, class: 'target-status') do
content_tag(:span, nil, class: "status-box status-box-#{type}-#{todo.target.state.dasherize}") do content_tag(:span, nil, class: "status-box status-box-#{type}-#{todo.target.state.to_s.dasherize}") do
todo.target.state.capitalize todo.target.state.to_s.capitalize
end end
end end
end end
...@@ -220,7 +220,7 @@ module TodosHelper ...@@ -220,7 +220,7 @@ module TodosHelper
when MergeRequest, Issue when MergeRequest, Issue
%w(closed merged).include?(todo.target.state) %w(closed merged).include?(todo.target.state)
when AlertManagement::Alert when AlertManagement::Alert
%w(resolved).include?(todo.target.state) %i(resolved).include?(todo.target.state)
else else
false false
end end
......
...@@ -127,7 +127,7 @@ module AlertManagement ...@@ -127,7 +127,7 @@ module AlertManagement
scope :counts_by_status, -> { group(:status).count } scope :counts_by_status, -> { group(:status).count }
scope :counts_by_project_id, -> { group(:project_id).count } scope :counts_by_project_id, -> { group(:project_id).count }
alias_method :state, :human_status_name alias_method :state, :status_name
def self.sort_by_attribute(method) def self.sort_by_attribute(method)
case method.to_s case method.to_s
......
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