質問編集履歴
1
書式の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,7 +2,33 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
- route
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
|
9
|
+
Rails.application.routes.draw do
|
10
|
+
|
11
|
+
devise_for :users
|
12
|
+
|
5
|
-
|
13
|
+
get 'messages/index'
|
14
|
+
|
15
|
+
root to: "rooms#index"
|
16
|
+
|
17
|
+
resources :users, only: [:edit, :update]
|
18
|
+
|
19
|
+
resources :rooms, only: [:new, :create, :destroy] do
|
20
|
+
|
21
|
+
resources :messages, only: [:index, :create, :destroy]
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
```
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
- コントローラー
|
6
32
|
|
7
33
|
```Ruby
|
8
34
|
|
@@ -44,7 +70,7 @@
|
|
44
70
|
|
45
71
|
```
|
46
72
|
|
47
|
-
jsファイル
|
73
|
+
- jsファイル
|
48
74
|
|
49
75
|
```js
|
50
76
|
|