-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
63 lines (50 loc) · 1.95 KB
/
README
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
54
55
56
57
58
59
60
61
62
63
- Devise
- Adding to Gemfile: gem 'devise', '1.1.rc0' (run 'bundle install' after this)
- Update development.rb: config.action_mailer.default_url_options = { :host => 'localhost:3000' }
- Remove activatable
- Defining root path: root :to => "users#new"
- Generating User model: 'rails generate devise User'
- Add admin boolean field
- rails generate migration AddAdminToUsers admin:boolean
- URLS
- http://localhost:3000/users/registration/sign_up
- http://localhost:3000/users/sign_in
- Models
- rails generate model Order user_id:integer total:decimal delivery_method:string address:string
- rails generate model OrderItem order_id:integer product_id:integer quantity:integer
- rails generate scaffold Product name:string description:string tip:string category:string price:decimal
- Seed file, some products and an Admin user
- Associations
- Order / Product / User / OrderItem
- Adding logic methods
- Installing Paperclip
- rails generate migration AddImageToProducts image_file_name:string image_content_type:string image_file_size:integer image_updated_at:datetime
- Controller
- Products (Scaffolded)
- Only admin should edit/update/create/delete
- Carts with updating Application Controller (current_cart)
- add and remove
- Orders
- index => admin ? all : my
- new => has the shipping method and the address fields
- show / create
- reorder => Order.new(@order.clone)
- Pages
- index / about
- Update the application layout
- sidebar with cart view
- render Login/logout in the sidebar/header
- Product partial with 'add to cart'
- Show order page
- show cart page
- Routes
- Root is to pages#index
- Active Merchant
- Ideas with directions.
- Dynamic categories (belongs_to and has_many)
- Add extra fields to Order item - Customize size
- Search functionality - SimpleSearch plugin
- Email a friend
- Reorder
- My orders
- Pagination for products/orders [Done]