-
Notifications
You must be signed in to change notification settings - Fork 0
/
_generate_commands.txt
53 lines (38 loc) · 1.95 KB
/
_generate_commands.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
53
rails generate controller FixedStaticPages home contact
rails generate scaffold Tag name:string:index description:text
# Set up <header> in application.html.erb
# Create app/assets/stylesheets/tamsin.css.scss
# In application.css, require first scaffolds, then tamsin stylesheet
# In production.rb set config.force_ssl = true
# In ApplicationController:
# protect_from_forgery with: :exception
# include AdminPagesHelper
rails generate controller AdminPages adm_login adm_logout
rails generate figaro:install
# Take secrets.yml out of .gitignore, but in secrets.yml, verify that for production
# secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
# For Heroku, SECRET_KEY_BASE is set automatically.
# Make sure that config/application.yml is in .gitignore. This contains secret environment
# variables as name: value , accessible via figaro.
# If password fiels in forms are NOT named 'password', add the name to the
# parameter filter list in config/initializers/filter_parameter_logging.rb
# Prepare Uploader:
# Add gem carrierwave
rails generate uploader Static # creates app/uploaders/static_uploader.rb
mkdir app/views/pages # For static pages
# rails generate model
# kind: news musings
# bodytype: text, html, markdown
rails generate model Writeup kind:string title:string subtitle:string body:text bodytype:string valid_from:datetime valid_to:datetime
rails generate model Customer firstname:string familyname:string:index company:string url:string email:string address:text notes:text
# Join Table
# http://railscasts.com/episodes/47-two-many-to-many
rails generate migration customers_tags customer_id:integer tag_id:integer
# Customer:
# has_and_belongs_to_many :tag
# Tag:
# has_and_belongs_to_many :customer
# Static Pages. seqno==0 means: Don't show right now (except in admin)
rails generate model Userpage filename:string:index linkname:string seqno:integer valid_from:datetime valid_to:datetime
# If partials need to be rendered:
rails generate controller pages