Ruby on Rails: Simple way to select all records of a nested model?
- by Josh Pinter
Just curious, I spent an embarrassing amount of time trying to get an array of all the records in a nested model. I just want to make sure there is not a better way.
Here is the setup:
I have three models that are nested under each other (Facilities Tags Inspections), producing code like this for routes.rb:
map.resources :facilities do…