diff --git a/app/assets/stylesheets/kluk.css b/app/assets/stylesheets/kluk.css index 659dea5..9dc978f 100644 --- a/app/assets/stylesheets/kluk.css +++ b/app/assets/stylesheets/kluk.css @@ -42,32 +42,7 @@ main { align-content: center; } -.bar-afond { - background: black; - width: 10px; - height: 10px; -} - -.bar-creatif { - background: red; - width: 10px; - height: 10px; -} - -.bar-frigo { - background: gray; - width: 10px; - height: 10px; -} - -.bar-croisiere { - background: green; - width: 10px; - height: 10px; -} - -.bar-en-charge { - background: orange; +.bar { width: 10px; height: 10px; } diff --git a/app/models/user.rb b/app/models/user.rb index fe92d95..156f55a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -2,6 +2,7 @@ class User < ApplicationRecord has_secure_password has_many :sessions, dependent: :destroy has_many :moods, -> { order "recorded_at" } + has_many :modes normalizes :email_address, with: ->(e) { e.strip.downcase } diff --git a/app/views/moods/index.html.erb b/app/views/moods/index.html.erb index 5e0bc10..0063f55 100644 --- a/app/views/moods/index.html.erb +++ b/app/views/moods/index.html.erb @@ -12,26 +12,12 @@
Légende
-
-
-
Triste
-
-
-
-
En charge
-
-
-
-
Croisiere
-
-
-
-
Creatif
-
-
-
-
A fond
-
+ <% @user.modes.each do |mode| %> +
+
+
<%= mode.label %>
+
+ <% end %>