-
Notifications
You must be signed in to change notification settings - Fork 0
/
OMR-notes
46 lines (36 loc) · 1.01 KB
/
OMR-notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Commands
========
git add . # stage all changes for commit
git commit -am "MESSAGE" # commit all changes with message
git push # push to GitHub
rake db:migrate # runs migration file so that it generates tables in your database
git push heroku master # push changes to heroku
heroku open # opens heroku app?
heroku rename newNAME # replaces new domain name for heroku app
heroku logs --tail #for debugging
heroku run rake db:migrate # migrate db to heroku
Resources
=========
Resource = CRUD
Create / Post
Read / Get
Update / Put
Destroy / Delete
Twitter Resources:
1. User
2. Tweet
3. Session
Misc.
=====
Ruby code
<%= xyz %> } equal-sign means "visible on page"
<% xyz %> } no equal-sign "invisible"
Loop (example)
<% @pins.each do |pin| %>
<tr>
<td><%= pin.description %></td>
<td><%= link_to 'Show', pin %></td>
<td><%= link_to 'Edit', edit_pin_path(pin) %></td>
<td><%= link_to 'Destroy', pin, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>