-
Notifications
You must be signed in to change notification settings - Fork 71
/
params.json
1 lines (1 loc) · 3.17 KB
/
params.json
1
{"name":"Rails Beginner Cheatsheet","tagline":"A cheat sheet for rails beginners, taking care of a lot of basic stuff and information. Aimed at helping beginners too look up stuff. Originally created for my RailsGirls project group.","body":"# A little cheat sheet\r\n**Bold** things are what is really important e.g. the command or whatever is directly associated with the command. _Italic_ things are their arguments. And things in brackets are optional :-)\r\nThis will hopefully eventually become a github page and a PDF!\r\n\r\n## console basics\r\n<table>\r\n <tr>\r\n <th>Concept</th>\r\n <th>Usage</th>\r\n <th>Example</th>\r\n <th>Description</th>\r\n </tr>\r\n <tr>\r\n <td>Change directory</td>\r\n <td><strong>cd</strong> <em>directory</em></td>\r\n <td><p>cd my_app</p><p>cd my_app/app/controllers</p></td>\r\n <td>Changes the directory to the specified directory on the console</td>\r\n </tr>\r\n <tr>\r\n <td>List contents directory</td>\r\n <td><p><strong>list</strong> <em>(directory)</em></p>\r\n <p>Windows: <strong>dir</strong> <em>(directory)</em></p>\r\n </td>\r\n <td><p>ls</p><p>ls my_app</p></td>\r\n <td>Shows all contents (files and folders) of the directory. If no directory is specified shows the contents of the current directory.</td>\r\n </tr>\r\n <tr>\r\n <td>Directory you are currently in</td>\r\n <td><strong>pwd</strong></td>\r\n <td>pwd</td>\r\n <td>Shows the full path of the directory you are currently in. E.g./home/tobi/railsgirls</td>\r\n </tr>\r\n</table>\r\n\r\n## Ruby Basics\r\n<table>\r\n <tr>\r\n <th>Concept</th>\r\n <th>Usage</th>\r\n <th>Example</th>\r\n <th>Description</th>\r\n </tr>\r\n <tr>\r\n <td>Array</td>\r\n <td><strong>[]</strong></td>\r\n <td><p>[]</p><p>[\"Rails\", \"fun\", 5]</p></td>\r\n <td>Creates an Array, empty or with the specified contents. An empty is a collection of things indexed with numbers.</td>\r\n </tr>\r\n <tr>\r\n <td>Acces array</td>\r\n <td>an_array<strong>[<em>number</em>]</strong>\r\n </td>\r\n <td><p>an_array = [\"Helau\", \"Mooo\", \"zoooo\"]</p>\r\n <p>an_array[0] --> \"Helau\"</p>\r\n <p>an_array[2] --> \"zoooo\"</p>\r\n </td>\r\n <td>As an Array is a collection of different elements, you often want to access a single element of this Array. Arrays are indexed by numbers, you can use that number to access an individual element. Be aware that the numbering actually starts 0 so the first element actually is the 0th. And the last element of a 3 element array is element number 2. </td>\r\n </tr>\r\n <tr>\r\n <td>Assigning Array Values</td>\r\n <td>an_array<strong>[<em>number</em>] = \"new value\"</strong></td>\r\n <td><p>an_array = [\"Helau\", \"Mooo\", \"zoooo\"]</p>\r\n <p>an_array[2] --> \"Oh I'm all new\"</p>\r\n <p>an_array --> [\"Helau\", \"Mooo\", \"Oh I'm all new\"]</p></td>\r\n <td>Assigning new Array Values works a lot like accessing them, you just add an equals sign and a new value et voila you changed an element of the array! Weehuuuuu!</td>\r\n </tr>\r\n</table>","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}