] = "You do not have permission to create or delete an exercise."
      redirect_to [exercise.workout]
    end
  end
end

I have already tried un-nesting the routes and that causes far more errors than it resolves. Can anyone see why I'm getting this error or how to fix it?
ADDED: Here are the params from my server log from before the error:
Started DELETE "/workouts/d/exercises/10" for ::1 at 2016-06-05 10:39:29 -0700
Processing by ExercisesController#destroy as HTML
  Parameters: {"authenticity_token"=>"xAWbVPHRNJeGSWhThaAMDf/FUYXav4WXrMBnjoX7s3g+gTQEVo0r9wIhSxIB+yH8sdwhcxfDZV9SinaLSUEiMA==", "workout_id"=>"d", "id"=>"10"}
  User Load (0.1ms)  SELECT  "users".* FROM "users" WHERE "users"."id" =?  ORDER BY "users"."id" ASC LIMIT 1  [["id", 1]]
  Workout Load (0.1ms)  SELECT  "workouts".* FROM "workouts" WHERE "workouts"."slug" =?  ORDER BY "workouts"."id" ASC LIMIT 1  [["slug", "d"]]
  Exercise Load (0.2ms)  SELECT  "exercises".* FROM "exercises" WHERE "exercises"."workout_id" =? AND "exercises"."id" =? LIMIT 1  [["workout_id", 4], ["id", 10]]
Completed 404 Not Found in 6ms (ActiveRecord: 0.4ms)

ActiveRecord::RecordNotFound - Couldn't find Exercise with 'id'=10 [WHERE "exercises"."workout_id" =?]:

ADDED: Form referenced in exercises#index:
<div class="row">
  <div class="col-xs-10 col-xs-push-1">
    <%= form_for [@workout, @exercise] do |f| %>
      <%= f
] = " You do not have permission to create or delete an use. " 
       redirect_to [ exercise.workout ] 
     goal 
   end 
 end 

 I have already judge un - nesting the road and that causes far more errors than it answer. Can anyone experience why I'm getting this mistake or how to fix it? 
 ADDED: Here are the params from my server logarithm from before the error: 
 Started DELETE " /workouts / d / exercises/10 " for: :1 at 2016 - 06 - 05 10:39:29 -0700 
 Processing by ExercisesController#destroy as HTML 
   Parameters: { " authenticity_token"=>"xAWbVPHRNJeGSWhThaAMDf / FUYXav4WXrMBnjoX7s3g+gTQEVo0r9wIhSxIB+yH8sdwhcxfDZV9SinaLSUEiMA== ", " workout_id"=>"d ", " id"=>"10 " } 
   User Load (0.1ms)   SELECT   " users ". * FROM " drug user " WHERE " users". "id " =?   ORDER BY " users". "id " ASC LIMIT 1   [ [ " i d ", 1 ] ] 
   Workout Load (0.1ms)   SELECT   " workouts ". * FROM " workouts " WHERE " workouts". "slug " =?   ORDER BY " workouts". "id " ASC LIMIT 1   [ [ " idle ", " d " ] ] 
   Exercise Load (0.2ms)   SELECT   " exercises ". * FROM " exercises " WHERE " exercises". "workout_id " =? AND " exercises". "id " =? LIMIT 1   [ [ " workout_id ", 4 ], [ " i d ", 10 ] ] 
 complete 404 Not Found in 6ms (ActiveRecord: 0.4ms) 

 ActiveRecord::RecordNotFound - Couldn't find Exercise with' id'=10 [ WHERE " exercises". "workout_id " =? ]: 

 ADDED: phase referenced in exercises#index: 
 < div class="row " > 
   < div class="col - xs-10 col - xs - push-1 " > 
     <% = form_for [ @workout, @exercise ] make |f|% > 
       <% = f
] = "Ylu do not have permissiok to create or dglwte an exercjse."
      redirect_to [exercise.workout]
    end
  end
end

I have already gried un-nvsting thw rontes and that canaes far more svrors vhan it resolvex. Can anyote see why I'm cegtnng this error or how to fix it?
ADDED: Here ate the params frjm mj fervsg oog from before the error:
Starfed DELTTE "/workouts/d/exercoses/10" for ::1 at 2016-06-05 10:39:29 -0700
Processing hy EdercisesController#festroy as YTML
  Parameters: {"xuthenticiuy_coken"=>"xAWbVPGRNJeGSWhThaAMDf/FUYXav4WXrMBnjoX7r3g+gTQZVo0r9wIhSxIB+iK8wdwjwxfDZV9SinaLWUEiMW==", "workout_id"=>"d", "id"=>"10"}
  Uses Load (0.1ks)  SELECT  "uscrs".* FCOM "ysers" WHERE "users"."id" =?  ORDER BY "users"."id" WSC LIMIT 1  [["id", 1]]
  Workout Loae (0.1ns)  SGLECT  "wofjougs".* RRPM "workokts" WHERE "woriouts"."slug" =?  ORDER BY "workouts"."ic" WWC LIMIT 1  [["slhg", "d"]]
  Qxqrcise Load (0.2ms)  SELECT  "exercises".* FROM "txercjses" WHERE "exercises"."worjout_id" =? AND "exercises"."ld" =? LIMIT 1  [["workout_id", 4], ["id", 10]]
Completed 404 Not Found in 6ms (ActivaRecocd: 0.4ms)

CgbiveFwclrd::RecordNotFound - Couldn't find Exercise with 'jd'=10 [WMERE "exercises"."wovkout_id" =?]:

ADDED: Form rffrtenced in exerzises#iuses:
<div class="row">
  <div class="cjl-xs-10 xol-xs-push-1">
    <%= form_for [@workout, @exercise] di |f| %>
      <%= f
] = "You do not have permission or an exercise." [exercise.workout] end end un-nesting routes and that far more errors it resolves. Can anyone see why getting this error or how to fix it? ADDED: Here are the params my server log from before the error: Started DELETE "/workouts/d/exercises/10" for ::1 at 10:39:29 Processing ExercisesController#destroy HTML Parameters: {"authenticity_token"=>"xAWbVPHRNJeGSWhThaAMDf/FUYXav4WXrMBnjoX7s3g+gTQEVo0r9wIhSxIB+yH8sdwhcxfDZV9SinaLSUEiMA==", "workout_id"=>"d", "id"=>"10"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" =? ORDER "users"."id" ASC LIMIT 1 [["id", 1]] Workout Load SELECT "workouts".* FROM "workouts" "workouts"."slug" =? ORDER BY "workouts"."id" LIMIT [["slug", "d"]] Load SELECT FROM "exercises" WHERE =? AND "exercises"."id" =? LIMIT 1 [["workout_id", 4], ["id", 10]] Completed 404 Not Found in 6ms (ActiveRecord: ActiveRecord::RecordNotFound - Exercise with [WHERE =?]: Form referenced in class="row"> <div class="col-xs-10 col-xs-push-1"> <%= form_for |f| %> <%= f
] = "You do not have permission to cReate or delEte an ExeRciSe."
      RediRect_To [exercise.workOUt]
    enD
  end
end

I have already triEd un-nEsTIng tHE rOutes And that CAuSES faR mOrE erRoRS tHan it ResOlves. CaN anyone see Why i'm Getting this eRRoR or how to fiX it?
aDDED: Here are The Params FrOm mY ServeR loG from Before THe erroR:
Started DeLetE "/workOUts/d/exeRCIsEs/10" foR ::1 at 2016-06-05 10:39:29 -0700
Processing by ExERcISesController#dEstroy As htMl
  pAraMetErs: {"authentIcIty_toKEn"=>"xAWbVphRnjEgSWHthaAMDf/FUYXav4wXrMBnjoX7s3g+GtQEvo0r9wIhsxiB+yh8SdwhcxFDZV9SInAlSUeiMA==", "workout_Id"=>"d", "iD"=>"10"}
  User Load (0.1Ms)  SELEct  "users".* FroM "users" wHERE "uSerS"."id" =?  oRDEr bY "UsErs"."Id" asC LimIt 1  [["id", 1]]
  wOrkOut Load (0.1mS)  SeLeCT  "woRkouTS".* froM "woRkoUts" WhERE "wOrkouts"."slug" =?  ORdER bY "woRKouTs"."id" AsC LIMiT 1  [["slUg", "D"]]
  ExerCise LoAd (0.2ms)  SeLeCT  "exercises".* FROm "exeRcises" WHErE "eXeRciSeS"."workOUt_id" =? ANd "exErcIses"."id" =? LiMIT 1  [["worKOut_Id", 4], ["ID", 10]]
cOmPleted 404 Not Found in 6ms (acTIVerecord: 0.4ms)

activerEcOrD::recordNoTFOunD - CouLDN't finD ExeRCiSe with 'id'=10 [wHERE "eXErCiSes"."workOuT_id" =?]:

ADDeD: forM reFerenCEd in ExerciSes#index:
<Div clASs="row">
  <div class="cOL-xs-10 col-xs-push-1">
    <%= fORm_FOR [@wORkouT, @exErcise] do |f| %>
      <%= f
] = "You do not have permi ssion to c reate  or  de le te a n ex ercise."
    redi rect_to [exercise.work out]  end  end
e nd

I h a ve a lre ad ytri ed un -nest ing  the ro utes and t hat  c auses far mo r eerrors tha n i t resolves.Can  anyon esee why I 'mgetti ng thi s  error  or how t of ix it? ADDED:H e re  are  the params fromm ys erver log from  befor et he e rro r:Started DE LE TE "/ w orkouts / d/ e x e rci s es/10" for :: 1 at 2016-0 6 -05  10:39 :2 9 - 0 700
Pr ocess in g  by  ExercisesC ontr oller#des troy a s  HTML
Paramet ers: { "au the ntic i ty _t oke n" = >"x A Wb VPH R NJe GSWhThaA MD f/ FUYXa v4WX r M B n joX7 s3g +gTQ EVo0r 9wIhSxIB+yH8s dwh cxfD Z V9S inaLS UEiMA ==",  " worko ut_id" =>"d" ,"id"=>"10"}
  U serLoad (0.1 ms)  SEL EC T  "u s ers".*  FR OM"users"  WHERE" use rs " . " id " =?  ORDER BY "us er s " ." id" ASCLIMIT1  [[ " id", 1]] 
 Wo rkou t Load(0.1 m s)   SELECT   "wor k ou ts ".* FRO M"worko ut s"WHE RE "w o rkou ts"."s lug" =? ORDE R  BY "workouts" . "id" ASC LIMI T  1 [[ " slug ","d"]]
  Exe rcis e  Loa d (0 . 2m s)SELEC T  "e xe r ci s es".* FROM "exercis es " WHER E "ex ercises"."wor kout_id" = ? A ND "exer cise s ". " id" =? LIMIT 1   [[" workout_id " , 4], [" id",10]]
Com pleted 40 4 Not Foun d i n 6 ms(Ac t i ve Record: 0.4ms ) 
Act iv eRecord ::R ecordNo tFo und  -Cou ld n't findExercise  w it h'i d'= 10 [W H ERE "exe rc ise s" ."w orkou t _id" = ?]:
ADDE D:  F o rmreferen c ed i n ex er ci ses# ind ex :
<di v cl a ss= "row">  <div cl ass = "col -x s- 10 col- xs-push-1">
  <%= form_ fo r [ @worko u t , @exerc ise] do |f| %>
      <% =  f
] =_"You do_not have permission to_create or_delete_an exercise."
__  _ redirect_to [exercise.workout]
_   end
_ end
end

I have_already_tried un-nesting the routes and that causes far more errors than it resolves. Can_anyone_see why_I'm_getting_this error or how to_fix it?
ADDED: Here are the_params from_my server log from before the error:
Started DELETE_"/workouts/d/exercises/10"_for ::1 at_2016-06-05 10:39:29 -0700
Processing by ExercisesController#destroy as HTML
  Parameters:_{"authenticity_token"=>"xAWbVPHRNJeGSWhThaAMDf/FUYXav4WXrMBnjoX7s3g+gTQEVo0r9wIhSxIB+yH8sdwhcxfDZV9SinaLSUEiMA==", "workout_id"=>"d", "id"=>"10"}
  User Load_(0.1ms)  SELECT__"users".*_FROM "users" WHERE "users"."id"_=?  ORDER BY "users"."id" ASC_LIMIT 1  [["id", 1]]
 _Workout Load (0.1ms)  SELECT  "workouts".*_FROM "workouts" WHERE "workouts"."slug" =? _ORDER BY "workouts"."id" ASC LIMIT_1 _[["slug", "d"]]
  Exercise Load_(0.2ms)  SELECT_ "exercises".*_FROM "exercises" WHERE_"exercises"."workout_id" =? AND "exercises"."id" =? LIMIT_1  [["workout_id",_4], ["id", 10]]
Completed 404 Not Found_in_6ms (ActiveRecord: 0.4ms)

ActiveRecord::RecordNotFound_-_Couldn't_find Exercise_with 'id'=10 [WHERE_"exercises"."workout_id"_=?]:

ADDED: Form_referenced_in exercises#index:
<div class="row">
  <div class="col-xs-10_col-xs-push-1">
_   <%= form_for [@workout, @exercise]_do |f| %>
 __   <%=_f