Skip to content
Tim edited this page Jul 6, 2015 · 1 revision
  • @scenes = Scene.includes(:movie) creates a list of scene objects which includes the movie data.. so you can do @scenes.movie.first.movie.name

  • Category.joins(:posts).where(posts.comment = ???) This only pulls information back from Category but allows you to query stuff from the posts table.

Clone this wiki locally