質問編集履歴

3

markdown記法を導入

2018/03/07 03:18

投稿

Swedon
Swedon

スコア67

test CHANGED
File without changes
test CHANGED
@@ -30,6 +30,8 @@
30
30
 
31
31
 
32
32
 
33
+ ```
34
+
33
35
  ec2-user:~/environment/sample_app (master) $ rails server
34
36
 
35
37
  => Booting Puma
@@ -196,6 +198,8 @@
196
198
 
197
199
  ec2-user:~/environment/sample_app (master) $
198
200
 
201
+ ```
202
+
199
203
 
200
204
 
201
205
  4) エラーをなくすために実行したこと:Macの再起動、https://github.com/mhartl/sample_app/blob/master/config/routes.rb
@@ -218,6 +222,8 @@
218
222
 
219
223
  <sample_app/config/routes.rb>
220
224
 
225
+ ```
226
+
221
227
  SampleApp::Application.routes.draw do
222
228
 
223
229
  resources :users do
@@ -259,3 +265,5 @@
259
265
 
260
266
 
261
267
  end
268
+
269
+ ```

2

誤字の修正

2018/03/07 03:18

投稿

Swedon
Swedon

スコア67

test CHANGED
File without changes
test CHANGED
@@ -216,7 +216,7 @@
216
216
 
217
217
  追記
218
218
 
219
- <sample_app/config/routes>
219
+ <sample_app/config/routes.rb>
220
220
 
221
221
  SampleApp::Application.routes.draw do
222
222
 

1

別ファイルの情報

2018/03/07 00:56

投稿

Swedon
Swedon

スコア67

test CHANGED
File without changes
test CHANGED
@@ -211,3 +211,51 @@
211
211
  私自身、matchメソッドを詳しく調べる方面で調査しようと考えています。
212
212
 
213
213
  どうぞよろしくお願いいたします。
214
+
215
+
216
+
217
+ 追記
218
+
219
+ <sample_app/config/routes>
220
+
221
+ SampleApp::Application.routes.draw do
222
+
223
+ resources :users do
224
+
225
+ member do
226
+
227
+ get :following, :followers
228
+
229
+ end
230
+
231
+ end
232
+
233
+ resources :sessions, only: [:new, :create, :destroy]
234
+
235
+ resources :microposts, only: [:create, :destroy]
236
+
237
+ resources :relationships, only: [:create, :destroy]
238
+
239
+
240
+
241
+ root to: 'static_pages#home'
242
+
243
+
244
+
245
+ match '/signup', to: 'users#new'
246
+
247
+ match '/signin', to: 'sessions#new'
248
+
249
+ match '/signout', to: 'sessions#destroy', via: :delete
250
+
251
+
252
+
253
+ match '/help', to: 'static_pages#help'
254
+
255
+ match '/about', to: 'static_pages#about'
256
+
257
+ match '/contact', to: 'static_pages#contact'
258
+
259
+
260
+
261
+ end