A JavaScript cheat sheet with the most important concepts, functions, methods, and more. A complete quick reference for beginners. Free to download as PDF! Ruby BASICS Cheat Sheet Information Types: Ruby has a few different types of information types; below are some examples of what defines each and how they're properly formatted. Strings: Anything within quotes are considered strings. Numbers: More commonly referred to as integers, are simply written as digits.
Ready to Try Ruby? An Awesome Rails Cheat Sheet
Last week I wrote aboutmaking a Ruby and Rails course,and some of the lessons I learned in the process. One of the biggest lessons that I learned was thatRuby and Rails is way too much for a single session. Part of that pain came from the Rails cheat sheetcreated for the course because it was missing a lot of key information about Rails. We liked theidea of limiting the sheet to a single page, but lacking focus on a single topic resulted in a fewfrequently asked questions during the class that indicated that the cheat sheet wasn't quite right.
To start the process of improving my course materials, I have updated the Rails cheat sheet based onfeedback and experiences from the class. This version is entirely dedicated to information about Rails, which allowed for a few additionsthat I think are pretty valuable for any developer getting started with Rails.
MVC in Rails
The core concept in any framework is the architectural pattern it uses. This section is to helpremind people what each part of Rails' MVC pattern is used for and remind them ofthe naming conventions used. I found that I often confused which objects were singular orplural when I started with Rails and wish I had this kind of reminder when I was just gettingstarted with Rails.
Application structure
One of the more complicated things that you need to understand when building a Rails app is theapplication structure, or where all the different files go. There are tons of files and folders ina newly generated Rails app, and I definitely found it intimidating as a beginner. I have seencheat sheets that show the file structure before, but I tried to make what I needed when I wasstarting out in Rails by adding comments next to folders and files to help explain what theimportant files are.
Common controller patterns
The last big change to the cheat sheet was adding common patterns that you find in almost everyRails controller. The method names seem to be intuitive now that I am an experienced Railsdeveloper, but when I was new it could get a little confusing if I had to write the code myself.To help others with this problem, I came up with a short list of query methods that I see mostfrequently in simple applications.
More about routes
Last week I wrote aboutmaking a Ruby and Rails course,and some of the lessons I learned in the process. One of the biggest lessons that I learned was thatRuby and Rails is way too much for a single session. Part of that pain came from the Rails cheat sheetcreated for the course because it was missing a lot of key information about Rails. We liked theidea of limiting the sheet to a single page, but lacking focus on a single topic resulted in a fewfrequently asked questions during the class that indicated that the cheat sheet wasn't quite right.
To start the process of improving my course materials, I have updated the Rails cheat sheet based onfeedback and experiences from the class. This version is entirely dedicated to information about Rails, which allowed for a few additionsthat I think are pretty valuable for any developer getting started with Rails.
MVC in Rails
The core concept in any framework is the architectural pattern it uses. This section is to helpremind people what each part of Rails' MVC pattern is used for and remind them ofthe naming conventions used. I found that I often confused which objects were singular orplural when I started with Rails and wish I had this kind of reminder when I was just gettingstarted with Rails.
Application structure
One of the more complicated things that you need to understand when building a Rails app is theapplication structure, or where all the different files go. There are tons of files and folders ina newly generated Rails app, and I definitely found it intimidating as a beginner. I have seencheat sheets that show the file structure before, but I tried to make what I needed when I wasstarting out in Rails by adding comments next to folders and files to help explain what theimportant files are.
Common controller patterns
The last big change to the cheat sheet was adding common patterns that you find in almost everyRails controller. The method names seem to be intuitive now that I am an experienced Railsdeveloper, but when I was new it could get a little confusing if I had to write the code myself.To help others with this problem, I came up with a short list of query methods that I see mostfrequently in simple applications.
More about routes
When I was starting out with Rails, I think the hardest thing for me to remember was how basicrouting worked. I understood what CRUD actions were, but remembering the exact name for things issomething I always struggle with. To help with this, I've shortened down thetable in the Rails guide that explains this conceptinto something that fits on the cheat sheet. I had this in the original, but was able to add theHTTP verbs by condensing the wording.
Command line reference
I've started to find that there are a lot of different commands that you need to know to be able tofunction in a Rails development environment. I got a lot of tips and tricks from my coworkers when Istarted that made my day-to-day tasks significantly easier. I included the basics and these tips inthis section to pass on this knowledge to others.
Ruby Methods Cheat Sheet Download
I've really enjoyed trying to make a cheat sheet for something I use every day. Hopefully othersare able to find this work useful. If you have any comments or suggestions, let me know! I hope tomake more cheat sheets soon.
Rather have the cheat sheet in a different format? You can find it as a single web page here, ordownload a PDF version here.