Skip to content

Instantly share code, notes, and snippets.

@kenmazaika
Created April 7, 2015 20:53
Show Gist options
  • Save kenmazaika/4f0caaf00b73f3b34d7f to your computer and use it in GitHub Desktop.
Save kenmazaika/4f0caaf00b73f3b34d7f to your computer and use it in GitHub Desktop.
# this should load the workout drill with the id that is passed through
# logic about the "next" drill should be done elsewhere! The show
# action should be stupid.
def show
@workout_drill = WorkoutDrill.find(params[:id])
# NO: @workout = current_user.workouts.last
# NO: @workout_drill = @workout.workout_drills.where(:complete => false).first
# NO: if @workout.workout_drills.any?{|w| w.complete == false}
# NO: else
# NO: flash[:notice] = "All done! Congratulations!"
# NO: redirect_to dashboard_player_path
# NO: end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment