sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove
sudo reboot
| https://www.postgresql.org/docs/9.3/libpq-pgpass.html | |
| home/sd2labs | |
| host:5432:DBNAME:USER:PASSWORD | |
| chmod 0600 ~/.pgpass |
| <!-- Contact batch email --> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' /> | |
| </head> | |
| <body> | |
| <div>Name: <%= @name %></div> | |
| <br> | |
| <div>Subject: <%= @subject %></div> |
| $('#pincode').on('input', function() { | |
| pin = $('#pincode').val(); | |
| $('#pincode-value').val(pin); | |
| }); | |
| $('#pincode-value').on('input', function() { |
| items = Model | |
| .where(first_name: 'Harvey') | |
| .where('id = 3') | |
| .where('id = ?', 3) | |
| .order(:title) | |
| .order(title: :desc) | |
| .order("title DESC") | |
| .reorder(:title) # discards other .order's |
| # Rails Models | |
| ### Generating models | |
| $ rails g model User | |
| ### Associations | |
| belongs_to | |
| has_one |
First, Create a folder inside of lib called seeds
Put your CSV file example.csv into the lib/seeds folder. In the example below, the file is called real_estate_transactions.csv
Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.