Order the legend in the same order as the enum
This commit is contained in:
parent
b535f7ce3b
commit
4c7f9af73d
1 changed files with 2 additions and 2 deletions
|
@ -89,9 +89,9 @@ class StatsController < ApplicationController
|
|||
|
||||
def satisfaction_usagers
|
||||
legend = {
|
||||
Feedback.ratings.fetch(:unhappy) => "Mécontents",
|
||||
Feedback.ratings.fetch(:happy) => "Satisfaits",
|
||||
Feedback.ratings.fetch(:neutral) => "Neutres",
|
||||
Feedback.ratings.fetch(:happy) => "Satisfaits"
|
||||
Feedback.ratings.fetch(:unhappy) => "Mécontents"
|
||||
}
|
||||
|
||||
totals = Feedback.where(created_at: 5.weeks.ago..Time.now).group_by_week(:created_at).count
|
||||
|
|
Loading…
Reference in a new issue