Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
ruby-1.9.2-p290 :006 > screening = Screening.find_by_id(2)
Screening Load (0.8ms) SELECT "screenings".* FROM "screenings" WHERE "screenings"."id" = 2 LIMIT 1
=> #<Screening id: 2, cinema_id: 1, film_id: 2>
ruby-1.9.2-p290 :007 > screening.cinema
Cinema Load (10.9ms) SELECT "cinemas".* FROM "cinemas" WHERE "cinemas"."id" = 1 LIMIT 1
=> #<Cinema id: 1, name: "Cineworld Aberdeen", url: "Queens Link Leisure Park, Links Road, Aberdeen", postcode: "AB24 5EN", telephone: "0871 200 2000", created_at: "2012-03-29 21:33:25", updated_at: "2012-03-29 21:33:27", external_id: 1>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.