jatwell93 / rubyproject

1 stars 1 forks source link

UsersController#show - Finding single excercise #15

Open Mirv opened 7 years ago

Mirv commented 7 years ago

ActiveRecord::RecordNotFound in UsersController#show

Couldn't find Exercise with 'id'=2 [WHERE "exercises"."user_id" = ?]

    #@workout = Workout.find(params[:id])
    @random_workout = Workout.where.not(id: @workout).order("RANDOM()").first(3)
    @exercise = current_user.exercises.find(params[:id])
    @exercises = current_user.exercises.all
    @friends = current_user.friends
  end
Mirv commented 7 years ago

Need to verify this later - bouncing it out to the lower end of pending