Ruby on Rails Cheat Sheet - Ruby On Rails - ILoveJackDaniels.com

来源:百度文库 编辑:神马文学网 时间:2024/04/28 17:34:56
Skip Navigation ?Accessibility statement






Ruby on Rails Cheat Sheet
Posted inCheat Sheets,Ruby On Rails on January 11, 2006
The Ruby On Rails cheat sheet is designed to be printed on an A4 sheet of paper and live by a developers desk, to make life a bit easier. A description of what is on the cheat sheet follows, or if you are impatient, you can go straight to the full size Ruby On Rails cheat sheet.
PNG, 99KB PDF Coming Soon
I am no expert in Ruby, On Rails or off, so to ensure this cheat sheet was as useful as possible, I pestered the very helpfulAmy Hoy of(24)Slash7 and David Heinemeier Hansson ofLoud Thinking into giving me a hand. Thanks, both of you - I appreciate it. In the same vein, though the cheat sheet has been checked there is a chance there is the occasional typo - if anybody spots a mistake (or something that could be worded better) please let me know.
Default Directory Structure

Ruby on Rails by default uses a rather large selection of folders and files, organised into a directory structure. This is a great feature, but does occasionally lead to people getting slightly lost and forgetting where to find something, especially if what they are looking for is something they use infrequently. This section shows visually the default directory structure of a Ruby on Rails site.
Pre-Defined Variables

Ruby on Rails, like most languages, includes a large number of predefined variables. These shorthand variable names are often tricky to dig out from the back of the mind when actually needed, so here is a convenient list of the most useful of them.
Reserved Words

In much the same way as Pre-defined variables, Ruby on Rails makes use of reserved words and these are also often not easy to remember. Using them out of context can cause all sorts of problems, so this list is provided to ensure that doesn‘t happen. Ignore it at your peril!
Regular Expression Syntax

It seems that no matter the language, most developers always spend some time stumbling through regular expressions before they are comfortable with them. Ruby on Rails is no different, and the regular expression syntax is the same familiar syntax as used in PHP and Perl. This section outlines the building blocks of patterns in regular expressions for Ruby on Rails.
Methods

Ruby on Rails is very much an object oriented language. Every object has methods. These sections list the useful methods for working with String, Array, Time and Regex objects. It also lists validation methods and methods from the enumerables mixin - which are some of the most looked-up.
So now that you know what it does, please feel free to print out the Ruby on Rails cheat sheet:
PNG, 99KB PDF Coming Soon
And finally, if you like the cheat sheets, and want to say thanks, I do have anAmazon Wishlist. Thankyou very much to those who have already hunted it down and sent me something nice - I‘m very grateful!
Please note: If you wish to link to the Ruby on Rails cheat sheet from elsewhere, please link to this page so others find the description, rather than linking directly to the sheet.
7 comments
Related Posts
CSS Cheat SheetJavaScript Cheat SheetPHP Cheat SheetHTML Character Entities Cheat SheetMySQL Cheat Sheet
Back to Top  | Site Map  | Syndication (RSS and Atom feeds)
About
ILoveJackDaniels.com is the online playground of Dave Child, an internet marketing consultant and web developer from Brighton, on the south coast of the UK.Read more.
Topics
AccessibilityApacheApplicationsASPBlogBlogsBrowsersCheat SheetsCSSDesignDvorakJavaScriptMiscellaneousOperaPHPphp.ini GuideResourcesRuby On RailsSecuritySearch Engine MarketingSpamUser Scripts
Search

Sponsors
ThinkHost Hosting
Quality PHP/MySQL hosting powered by renewable energy.
Try ThinkHost for two months for free with this coupon: THD11447M28
Elsewhere
Work:Propellernet Forums:Cre8asite News:Bloglines Links:del.icio.us Photos:Flickr
Copyright ?2003 - 2005Dave Child. Code within articles is licensed under aCreative Commons License.Privacy Policy.

_xyz