I'm following Kevin Skoglund's rails 3 tutorial while using rails 5. This is my first language to learn so I'm still at the stage of somewhat blindly following the tutorial. After learning about "Many to Many associations: Rich" we moved onto "Traversing a Rich Association". This is where I am having trouble.
I back tracked several videos and can't find where I made a mistake.
Kevin says the following code is to "skip past the join table to see what sections we've edited":
me.sections
Then he states, "we can do it from the other side too". And he enters:
section = Section.find(1)
Here is where I run into problems. I get the following:
ActiveRecord: :RecordNotFound: Couldn't find section with 'id'=1
If I am understanding correctly, the section with 'id' = 1 exists because I just viewed it with
me.sections
I included a screenshot of Kevin and my command prompt for comparison.
Thanks so much for the help, I know this is probably simple but I haven't found anything that helped by googling.
David Boyette
me.sections
is empty. Please check that really me
is associating a section.
BTW, for the next time please copy/paste your output instead of taking a screenshot because is easier to handle for people who answers you