mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-13 17:52:22 +00:00
reward view bugs
This commit is contained in:
parent
95e52378d9
commit
502b44d703
3 changed files with 4 additions and 5 deletions
|
|
@ -14,7 +14,7 @@ class RewardsController < ApplicationController
|
|||
|
||||
# GET /rewards/1/edit
|
||||
def edit
|
||||
@reward.user_id = current_user.id
|
||||
@reward = current_user.rewards.find(params[:id])
|
||||
end
|
||||
|
||||
# POST /rewards
|
||||
|
|
@ -37,7 +37,7 @@ class RewardsController < ApplicationController
|
|||
# PUT /rewards/1
|
||||
# PUT /rewards/1.json
|
||||
def update
|
||||
@reward = curren_user.rewards.find(params[:id])
|
||||
@reward = current_user.rewards.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
if @reward.update_attributes(params[:reward])
|
||||
|
|
|
|||
|
|
@ -2,5 +2,4 @@
|
|||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @reward %> |
|
||||
<%= link_to 'Back', rewards_path %>
|
||||
<%= link_to 'Back', habits_path %>
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', rewards_path %>
|
||||
<%= link_to 'Back', habits_path %>
|
||||
|
|
|
|||
Loading…
Reference in a new issue