mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-13 17:52:22 +00:00
Redirect update back to list, safely view habit name
This commit is contained in:
parent
523a207555
commit
588ad0c900
2 changed files with 2 additions and 2 deletions
|
|
@ -56,7 +56,7 @@ class HabitsController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
if @habit.update_attributes(params[:habit])
|
||||
format.html { redirect_to @habit, notice: 'Habit was successfully updated.' }
|
||||
format.html { redirect_to habits_url, notice: 'Habit was successfully updated.' }
|
||||
format.json { head :no_content }
|
||||
else
|
||||
format.html { render action: "edit" }
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
when s>=5 && s<15 then score = 'good'
|
||||
when s>=15 then score = 'done'
|
||||
end
|
||||
name = "<span class='#{score}'>#{habit.name}</span>"
|
||||
name = "<span class='#{score}'>#{h(habit.name)}</span>"
|
||||
%>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue