Created
March 30, 2012 00:01
-
-
Save jagmitg/2245081 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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