RubyOnRails-Cheatsheet
Here is the PDF I created based on a set of notes from books, tutorials, websites I used to learn Ruby On Rails. Please leave some comments below to let me know this was useful for you and people are interested in this.
Also, I’d recommend you buy a copy of “Agile Web Development with Rails” from the Pragmatic Programmers or Amazon.com. It definitely gave me a quick boost in my RoR learning and is a great reference document. Read my review here.
If you need to contact me, email me [ contact AT blainekendall.com ]
I hope I haven’t borrowed too much from the individual authors, but I don’t think this document is anything that lifts any complete content. If the original authors feel so, please contact me and I’ll gladly remove this document.
keywords: cheatsheet

December 6th, 2005 at 4:35 pm
[…] Along with many software coders, I’ve become a Ruby on Rails fan as well. I’ve had an interest in it for a while after reading so many websites talking about productivity gains. Its simplicity and speed of getting an application moving amazed me. Now I want to give back by helping to increase the RoR knowledge base by providing a Ruby On Rails cheatsheet. […]
December 6th, 2005 at 6:49 pm
For the last and final time (I’ll get this right, it’s late
)
Looking good and it’s a joy to work through. One thing I noticed though, on the “Forms” section you have:
<% start_form_tag %> where it should be <%= start_form_tag %>
Kind regards
Jason
December 6th, 2005 at 7:04 pm
thank you.
December 29th, 2005 at 7:34 pm
[…] Here’s a very nice Ruby on Rails cheat sheet . […]
January 9th, 2006 at 5:04 pm
Nice cheatsheet.
May I make a suggestion? In the “Control Structures” section, make clear that Ruby’s control structures are actually expressions: they not only control the flow of execution but also evaluate to values, which can be used in other expressions. For example, (1 + if true; 10 else 20 end) evaluates to 11. Most common programming languages do not have this useful property, so many Ruby “switchers” are likely to overlook it unless somebody points it out.
Cheers,
Tom
January 9th, 2006 at 9:13 pm
nice. this covers pretty much the whole thing without waste of words. a paragraph or two explaining/linking the concepts would be a meaningful addition.
January 10th, 2006 at 3:30 am
This is an excellent tool/quick reference. Thank you for taking the time to compile this reference and making it available to the public.
January 10th, 2006 at 3:44 am
Good one … the best so far
January 10th, 2006 at 9:51 am
Great cheat sheet. Thanks for putting this together!
One comment - it does not render correctly in Apple’s Preview application. I suspect it’s a font problem…
January 10th, 2006 at 10:50 am
Really useful stuff! I’ll use it as my everyday handbook for next few months
January 10th, 2006 at 12:08 pm
FYI - it might be useful to add stuff on migrations in a future revision of this document. Otherwise, I love this and will be keeping it by my side when I am developing.
January 10th, 2006 at 2:58 pm
I’d suggest putting a URL where future versions may be found within the cheatsheet. Also, if you provided the source (input to PDF process) we could send you patches, (I spotted one typo: “blogkcs”). It is probably sufficiently long to merit a table of contents.
Seriously appreciated, please consider this as encouragement to develop it further.
January 10th, 2006 at 3:55 pm
I wish I could read it but in KGhostview the cheatsheet comes up full of garbage. There are long lines of capital “T”s and “E”s. And, I think some of the text is being overwritten by the garbage.
January 10th, 2006 at 4:17 pm
[…] Blaine Kendall released a very nice 14-page PDF that summarizes nicely gotchas, syntax and some basic building blocks of both Ruby and Rails. Get the pdf from his blog post here. […]
January 12th, 2006 at 7:08 am
Hoja de trucos para Ruby on Rails
Documento PDF con notas muy útil para aprender a programar con Ruby on Rails.
January 13th, 2006 at 1:13 am
Nice. Can I suggest adding the callback sequence in AR for reference?
* (-) save
* (-) valid?
* (1) before_validation
* (2) before_validation_on_create
* (-) validate
* (-) validate_on_create
* (4) after_validation
* (5) after_validation_on_create
* (6) before_save
* (7) before_create
* (-) create
* (8) after_create
* (9) after_save
taken from http://api.rubyonrails.com/classes/ActiveRecord/Callbacks.html
January 13th, 2006 at 9:42 am
[…] Blaine Kendall has put together a handy PDF containing many Ruby and Rails tips. […]
January 14th, 2006 at 3:02 pm
[…] cheatsheet permalink daily archives info This entry is called resistance to persistence » Blog Archive » RubyOnRails-Cheatsheet, and is part of mikeschramm.com, a collection of writings and errata by Mike Schramm. The previousentry is sutherland4.mov (video/quicktime Object), and the next entry is . pinged! If any other sites have linked to this entry, they’ll be listed here. Probably. I think it’s broken right now. schrammiest That’s what we call our most popular writings, according to links and views. […]
January 17th, 2006 at 9:00 am
[…] A very nice all in one place set of tidbits for Ruby on Rails RubyOnRails-Cheatsheet […]
January 17th, 2006 at 9:00 am
[…] A very nice all in one place set of tidbits for Ruby on Rails RubyOnRails-Cheatsheet […]
January 20th, 2006 at 1:41 am
[…] RubyOnRails-Cheatsheet Because any reference worth having, is worth having as a cheat sheet. (tags: rubyonrails) […]
January 22nd, 2006 at 8:16 pm
[…] Ruby On Rails Cheatsheet Tagged as: development howto reference ruby […]
February 5th, 2006 at 11:13 pm
From past weeks I am hooked by Ruby on Rails syndrome and found your superb cheatsheet which provide much of relief to focus me on next level.
February 11th, 2006 at 11:08 pm
thank you, this is an awesome thing to share! many would closely guard such a thing as an advantageous personal tool, but as it is becoming more clear everyday, openness and sharing can go even further
secondly, i’d like to ask a question but i don’t intend at ALL to be negative with some of its possible implications:
why is this a pdf? don’t RoR and all the “web 2.0″ concepts, essentially lead to the conclusion that your cheatsheet should be a shared, group editable document, available anywhere at it’s newest possible state?
it just seems weird that a tool - which enables the creation of collaborative web apps, and collaborative documents - would have a subtool (your cheatsheet) that does not take advantage of the very technology that it is helping to enable.
perhaps not!
looking forward to hear back,
trevor
February 16th, 2006 at 9:08 am
Thanks for a great resource. I’m just starting out with ruby and Rails, and this kind of thing really helps bring it all together. :0)
February 16th, 2006 at 11:35 am
Params needs to be described. I’d like a general routine to dump params in an html table format but haven’t got around to writing it yet. Anybody done this?
You have to inspect for hashes inside of hashes and so on.
February 22nd, 2006 at 11:03 am
[…] Ruby on Rails cheatsheet […]
March 1st, 2006 at 10:47 pm
Hi,
This is a very nice cheatsheet. If I may make a suggestion, it would be real cool if you had some database connection. For example, connecting to an oracle database or connecting to a multiple databases.
Deniz
March 2nd, 2006 at 12:54 pm
I’d like the see the regexp characters and rules added to this. I’m always looking those up.
Can you post the source document?
March 7th, 2006 at 6:48 pm
Gracias, está muy bien la cheatsheet.
March 8th, 2006 at 3:09 am
Wow man, this has been a very welcome reference. If only I’d had this a few months ago…
March 23rd, 2006 at 7:34 am
[…] Top 12 Ruby on Rails Tutorials Ruby on Rails Cheat Sheet by Blake Kendall Ruby on Rails Wiki […]
April 10th, 2006 at 12:57 pm
[…] Posted by TAD Mon, 10 Apr 2006 17:51:00 GMT Here’s some links to some RoR cheatsheets that I just found. I haven’t used them yet, though they’re getting fantastic buzz, so they may be worth check out! I Love Jack Daniel’s RoR cheatsheet: Official PNG Image Unofficial PDF Version Blaine Kendall’s 14 Page RoR PDF I hope you find these useful! If I use them, I’ll be sure to blog about it. […]
April 12th, 2006 at 10:22 pm
After a week of climbing several learning curves with regards to MySQL, Ruby, Rails, CSS, AJAX and such I’m finally making headway in my latest project with everything in a sort of hazy funk… feeling my way around clumzily. Then I found your cheatsheet, and suddenly everything is clearing up! It’s been a long time since I’ve seen such a dense offering of knowledge. Just wanted to drop a thanks for your effort. It’s the tear-out handy reference that I didn’t know The Agile Rails book was missing.
May 5th, 2006 at 8:56 am
[…] Ruby on Rails, otra, otra (guía de directorios). […]
May 8th, 2006 at 4:39 pm
Thanks so much Blaine! I was looking for something exactly like this. I like to have an overview when I’m learning a new language and until now I’ve not found anything like this for RoR. Thank you so much for the time and effort you have put into this and for sharing your cheatsheet.
May 11th, 2006 at 11:44 am
[…] I’ve been trying to do some Ruby On Rails development in my spare time for a personal fun project. I’ve been through almost every RoR tutorial, I’ve got the Agile Web Development with Rails book and read the majority of it, and written a very popular Ruby On Rails Cheatsheet. But every time I try to display relationship details between tables, I always got errors “undefined method“. I couldn’t see why this would work in my tutorials, but never in my own personal work. It all came down to a single letter - ’s’. […]
May 13th, 2006 at 11:14 am
[…] 更新 < Update:2006 - 05 -14 > And here’s another Ruby on Rails cheet sheet based on 《Agile Web Development with Rails》theory, by Blaine Kendall. […]
May 15th, 2006 at 10:17 am
Hey Blaine, I didn’t know about your Cheatsheet when I created mine… Your’s is great too!
July 19th, 2006 at 8:06 pm
Blaine…
just started exploring RoR…roughly 3 weeks today…and its marvelous features and power have captured my attention…im hoping sometime after a month i would start to develop a real RoR web app
and your cheatsheet shimmers like a ruby gem when i found it
ive been using flash’s actionscript (also an OO lang) , some mysql and PHP codes…and when i found RoR, it magically transformed my coding style…since its very easy to learn…
thanks! and more power!
from the pearl of the orient ~ philippines
and the city of love ~ iloilo city
::nonoy::javellana::
August 18th, 2006 at 5:38 pm
Ruby On Rails - Cheatsheet
A nice PDF created by Blaine Kendall based on a set of notes from books, tutorials, websites he used to learn Ruby On Rails.
August 30th, 2006 at 5:25 am
Great, really GREAT!
Thank You very much, this helped and helps me a lot!
greetings from lake constance, germany!
October 26th, 2006 at 6:24 pm
[…] RubyOnRails-Cheatsheet - PDF […]
October 29th, 2006 at 5:24 pm
[…] RubyOnRails-Cheatsheet - PDF […]
October 31st, 2006 at 8:25 pm
[…] RubyOnRails-Cheatsheet - PDF […]
November 1st, 2006 at 1:27 pm
Nice list. Very similar to my own list that I compiled as I was learning.
on page 4, you say “add the line model :modelname to application.rb for database persisted models”
Aren’t database persisted models automatically loaded? The only time I would use the model keyword would be for NON-database persisted models, like :cart. Unless I’m mistaken.
Anyway, awesome that you posted this list for everyone to use. Might I suggest making a wiki out of this cheat sheet (perhaps divided into printable sections) that people could publically fix and add to it? That would be very cool.
December 16th, 2006 at 12:54 am
[…] RubyOnRails-Cheatsheet - PDF […]
December 19th, 2006 at 1:39 pm
[…] RubyOnRails-Cheatsheet - PDF […]
January 3rd, 2007 at 4:59 pm
Hi, is there anything for the second edition then?
February 5th, 2007 at 4:53 am
Hi, the published cheatsheet is dated 12/6/05. Is there any new cheatsheet published after this(or is there anything in near future)?
Thanks
Saran
February 15th, 2007 at 5:21 am
Hi Blaike, haven’t checked your cheatsheet yet, but have d/l’ed it. Just wanted to leave a comment to say thanks for posting it. Share the love and all that.
- Darryl
February 19th, 2007 at 2:43 am
[…] http://www.blainekendall.com/index.php/rubyonrailscheatsheet/ […]
March 15th, 2007 at 10:55 pm
Sweet thanks for the info!!!
March 17th, 2007 at 1:31 am
Hey, thanks for that.
March 30th, 2007 at 11:58 am
[…] RubyOnRails-Cheatsheet - blainekendall.com […]
May 3rd, 2007 at 8:42 pm
[…] RubyOnRails-Cheetsheet […]
May 17th, 2007 at 10:01 pm
Great info you have here , thanks a lot!!!
May 23rd, 2007 at 11:11 pm
thank you for your doc.
July 18th, 2007 at 1:43 am
This is really great, thanks for all your time and hard work!
August 1st, 2007 at 7:10 am
read the posts above, I have nothing to add
March 29th, 2008 at 3:36 pm
Sweet resource, just what I have been looking for.
May 9th, 2008 at 5:36 am
A big Thank You!