reward view bugs

This commit is contained in:
Tyler Renelle 2012-02-04 17:50:06 -05:00
parent 95e52378d9
commit 502b44d703
3 changed files with 4 additions and 5 deletions

View file

@ -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])

View file

@ -2,5 +2,4 @@
<%= render 'form' %>
<%= link_to 'Show', @reward %> |
<%= link_to 'Back', rewards_path %>
<%= link_to 'Back', habits_path %>

View file

@ -2,4 +2,4 @@
<%= render 'form' %>
<%= link_to 'Back', rewards_path %>
<%= link_to 'Back', habits_path %>