-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnotes
53 lines (37 loc) · 1.05 KB
/
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
47
48
49
50
51
52
53
***Associations
Category
has_many :activities
:title-string
:detail-string
Activity
belongs_to: category
:category_id- integer
:name-string
:description-string
:url-string
***Set-up Models
rails g resource Category title:string --no-test-framework
rails g resource Activity name:string description:string category_id:integer url:string --no-test-framework
Migrate
rake db:migrate
***Create API/V1 folder
fetch('htttp://localhost:3000/api/v1/categories/1/activities)
namespace :api do
resources :categories do
resources :activities
end
end
***created a seed.file
rake:db drop
***download Cors
***Created actions on the controller for
Activity
Categories
*** Added Serializers-bundle install
FRONTEND
** setup index.js with store and redux
** set up files actions, components, containers and reducers
** import { connect } from 'react-redux' to connect Redux store with react
** create container
categoryContainer.js
** Added Router to index.js wrapping <APP/> child components