rename current_mood method
This commit is contained in:
parent
fe52089c38
commit
ae1263acff
2 changed files with 3 additions and 3 deletions
|
|
@ -34,7 +34,7 @@ class User < ApplicationRecord
|
||||||
MoodCalendarService.generate_calendar(moods)
|
MoodCalendarService.generate_calendar(moods)
|
||||||
end
|
end
|
||||||
|
|
||||||
def current_mood
|
def current_mode
|
||||||
self.moods.last&.mode || "croisiere"
|
self.moods.last&.mode || "croisiere"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="current-day column is-hidden-mobile">
|
<div class="current-day column is-hidden-mobile">
|
||||||
<section class="m-4">
|
<section class="m-4">
|
||||||
<figure class="image has-ratio">
|
<figure class="image has-ratio">
|
||||||
<%= image_tag(@user.current_mood + ".jpg", "data-mood-target": "image") %>
|
<%= image_tag(@user.current_mode + ".jpg", "data-mood-target": "image") %>
|
||||||
</figure>
|
</figure>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
<div class="container mb-4 p-3 has-background-white day-info">
|
<div class="container mb-4 p-3 has-background-white day-info">
|
||||||
<div class="title is-4">
|
<div class="title is-4">
|
||||||
<span class="icon"><i class="fa-regular fa-calendar"></i></span>
|
<span class="icon"><i class="fa-regular fa-calendar"></i></span>
|
||||||
<span data-mood-target="modeDay">Aujourd'hui : <%= @user.current_mood %></span>
|
<span data-mood-target="modeDay">Aujourd'hui : <%= @user.current_mode %></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="logs">
|
<div class="logs">
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue