-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes.txt
52 lines (33 loc) · 1.18 KB
/
notes.txt
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
47
48
49
50
51
52
To get the tests running (currently growl doesn't show every time)
1) spork --bootstrap
2) spork
3) autotest (may not be needed if growl doesn't work but may also
increase speed 5x)
4) rspec spec/
To currently be able to ctrl+c to end the server start it with
ruby script\rails server
CREATE A NEW PROJECT
- rails new <directory_name>
create a controller
- rails g controller welcome index
create DB/view scaffold
- rails generate scaffold User name:string email:string
MIGRATIONS
rails generate migration add_password_to_users encrypted_password:string
rails generate migration rename_userId_to_clazz_id, :userId, :clazz_id
rails generate migration drop_entry
rails generate scaffold Class name:string user_id:string
RESTART
rake db:reset
SEED
rake db:seed
rake assets:precompile
ENGINE YARD
View production.log
/data/*appname*/shared/log/production.log
Another way to do partials
<%= #render :partial => 'clazzs/single', :locals => {:some_variable => "somevalue", :some_other_variable => clazz} %>
PRODUCTION MODE
rake assets:precompile RAILS_ENV=production
rake db:migrate RAILS_ENV=production
ruby script\rails server -e production