#239 ActiveRecord::Relation Walkthrough
Nov 07, 2010 | 11 minutes | Active Record, Rails 3.0, Code Walkthrough
The new Active Record query methods in Rails 3 might seem like magic at first. But in this episode I unravel how it works by browsing the Rails 3 source code.
wow! rails's source code agian!
Hey Ryan I think it's time for a bit of a <video> tag here :) That would allow to watch the video while having the shownotes as a reference. Check out http://pomcast.com for example to see how it looks :)
Thanks for this Mondays sweetness :)
Just letting you know I've tried downloading episodes 14 and 16 and they start but hand part way through.
I tried 16's m4v and it downloads fine!
Great Cast! Video flickers here in the beginning... Same with the previous episode.
My guess is you're using VLC to watch the videos thanks to the "Open Network..." option, aren't you?
DON'T DO THAT: VLC has trouble to correctly download the Railscasts and play them live :-(
Instead, pre-download the video (using curl, wget...) and save it somewhere, then open the file with VLC: it will work fine (no need to wait for the download to finish: once a few percent —depending on your link speed— is saved, you can start watching it with VLC.)
Or use another player (QT Player on Mac works fine for me.)
@Frederic - thanks but no I am not watching them live (I did say I was downloading them & the issue was just with these earlier episodes!)
And just re-read my first post - the obvious typo should read 'hang' not 'hand' :)
@Dave Porter: sorry, my mistake; I think I missed the "download" part in your message (I certainly should change my eyes, or stop to only read one word out of two :-)
When I read your comment (and before posting mine), I tried to watch the aforementioned videos (only the .mov versions), both live with VLC and QT and after downloading them.
I only got problems when watching them live with VLC (for both episode: the video starts reading, then halts after a few seconds, then restarts reading and so on) and with the 14th's video when watching it live with QT: it quickly loads the first 2 minutes, then hangs for a while, then continues to download the video upto the end with no pause; if the pause at 2min was not too long, the reader does not have the time to catch up the download pause, and the video reads fine.
I got no download problems with curl, and the videos read fine with both VLC and QT.
That's why I made the supposition you were reading them live with VLC.
This cast actually made me take a deeper look into the Rails source code. I am still stunned about the sweetness of the code. It's so much more enlightening than I thought it would be. Keep up casting!
Excellent. As usual.
Really wonderful, esp. the open-ended part at the end where you point out methods that are worthy of further study.
Awesome! Just last week I stumbled upon the new methods, and got stuck trying to figure out what was happening. The subtitle should be "Unrolling rails spaghetti".
Ryan, the idea of exploring code behind is awesome!
Thank you very much for you great screencats!
That's a very interesting approach. It sheds some new light on the topic. Got to visit this blog more often
Thank you for your attention on this topic. It was very helpfull. Good work.
Nice, I think that you share his becouse yopu like us :P
Many thanks for these RailsCasts - they're marvellous.
There are (at least!) two things I'm unsure of with queries.
i) How to do an "OR" query (eg select user where user.id=current_user OR user.parent_id=current_user)
ii) Why are Rails folk sooo anti-SQL?
Great video! Thank you!
Oh my god this episode is splendid.
Previously I've been thinking, wow diving into the source code of rails would only be guru's things to do. But now by following your direction I finally appreciated and learnt the way to look inside source codes. Thank you Ryan.
very interesting, very useful, very well explained... and rails code is very clear! - thank you
I would love to understand this but my ruby skills are lacking. Can anyone point me to some good 1.9.2 resources?