Permalink
Browse files

Fixing html_safe output.

  • Loading branch information...
1 parent b23b851 commit 7b0de8139e982426a0b1881d486c8dd849054650 Rian Rainey committed Apr 1, 2013
@@ -62,10 +62,10 @@ def create
# PUT /workouts/1.json
def update
@workout = Workout.find(params[:id])
-
+binding.pry
respond_to do |format|
if @workout.update_attributes(params[:workout])
- format.html { redirect_to @workout, notice: 'Workout was successfully updated.' }
+ format.html { redirect_to workouts_path, notice: 'Workout was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
@@ -13,7 +13,7 @@
<% @entries.each do |entry| %>
<tr>
<td><%= entry.date_performed.strftime("%m/%d/%y") %></td>
- <td><%= entry.body %></td>
+ <td><%= entry.body.html_safe %></td>
<td><%= entry.rounds %></td>
<td><%= entry.repetitions %></td>
<td><%= entry.time %></td>
@@ -10,7 +10,7 @@
<tr>
<% if @workout %>
<td><%= @workout.title %></td>
- <td><%= @workout.body %></td>
+ <td><%= @workout.body.html_safe %></td>
<td>
<% if user_signed_in? %>
<ul class="inline">

0 comments on commit 7b0de81

Please sign in to comment.