Last active
December 17, 2015 18:29
-
-
Save telagraphic/5653700 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<tr> | |
<% if workout.persisted? %> | |
<td><%= time_ago_in_words(workout.created_at) %> ago</td> | |
<td><%= link_to workout.workouttype, edit_workout_path(workout) %></td> | |
<td><%= workout.reps %></td> | |
<td><%= workout.desc %></td> | |
<td><%= link_to 'remove', workout, confirm: 'Sure?', method: 'delete' %></td> | |
<% end %> | |
</tr> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def new | |
@workout = current_user.workouts.build | |
@workouts = current_user.workouts.paginate(:page => params[:page], :per_page => 30) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class='span12'> | |
<table class='table table-bordered'> | |
<%= will_paginate %> | |
<tbody> | |
<%= render @workouts %> | |
</tbody> | |
<%= will_paginate %> | |
</table> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment