Class names are CamelCase.
Methods and variables are snake_case.
Methods with a ? suffix will return a boolean.
| makes it easier to read |
| - Check rails version | |
| $ rails -v | |
| - To update rails | |
| $ gem update rails | |
| - Creating a new rails app using postgresql | |
| $ mkdir rails_projects | |
| $ cd rails_projects | |
| $ rails new myapp --database=postgresql |
| ken@ken-XPS-M1330:~$ cat /etc/*-release | |
| DISTRIB_ID=Ubuntu | |
| DISTRIB_RELEASE=17.04 | |
| DISTRIB_CODENAME=zesty | |
| DISTRIB_DESCRIPTION="Ubuntu 17.04" | |
| NAME="Ubuntu" | |
| VERSION="17.04 (Zesty Zapus)" | |
| ID=ubuntu | |
| ID_LIKE=debian | |
| PRETTY_NAME="Ubuntu 17.04" |
| lsof -wni tcp:3000 | |
| then kill it. |
| echo "" > log/development.log |
| # This is a skeleton for testing models including examples of validations, callbacks, | |
| # scopes, instance & class methods, associations, and more. | |
| # Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
| # | |
| # I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
| # so if you have any, please share! | |
| # | |
| # @kyletcarlson | |
| # | |
| # This skeleton also assumes you're using the following gems: |
| class TodoList < Array | |
| def self.load(file) | |
| # read the file, create a list, create items, add them to the list, return the list | |
| list = TodoList.new | |
| File.read(file).each_line do |line| | |
| list << line.chomp | |
| end | |
| list | |
| end |
| rm -rf <directory name> |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Bootstrap Navigation Bar</title> | |
| <!-- Bootstrap --> | |
| <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> |