Permalink
Browse files

Merge pull request #8 from rianrainey/fixes/5

Fixing html_safe output.
  • Loading branch information...
2 parents 0e52bfc + 7b0de81 commit 15f05a9b59d1b97e07a81e78139d70b4aeabeb2d rianrainey 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 15f05a9

Please sign in to comment.