質問編集履歴

1

修正したらerrorメッセージが変わりました。よろしくお願いいたします。

2018/08/26 03:06

投稿

gunofu
gunofu

スコア8

test CHANGED
@@ -1 +1 @@
1
- railsの起動時のRouting Errorについて
1
+ railsの起動時のName Errorについて
test CHANGED
@@ -206,8 +206,6 @@
206
206
 
207
207
  end
208
208
 
209
- redirect_to sign_in_path unless user_signed_in?
210
-
211
209
  # サインイン済みならトップページに遷移する
212
210
 
213
211
  def redirect_to_top_if_signed_in
@@ -255,3 +253,57 @@
255
253
  end
256
254
 
257
255
  ```
256
+
257
+
258
+
259
+ 皆様、ご意見ありがとうございます。
260
+
261
+ 返信遅くなり申し訳ありません。
262
+
263
+ users_helper.erの6行目のご指摘がありましたので、修正したところ以下のerrorメッセージに
264
+
265
+ 変わりました。
266
+
267
+ ![イメージ説明](10123099a7ef0ca8f6191f51f27b77c1.png)
268
+
269
+
270
+
271
+ ちなみにroutes.rbは以下になります。
272
+
273
+ ```routes.rb
274
+
275
+ Rails.application.routes.draw do
276
+
277
+ root 'users#sign_up'
278
+
279
+ get'top', to:'users#top', as: :top
280
+
281
+ get 'users/top'
282
+
283
+ resources :posts
284
+
285
+ get '/profile/(:id)', to:'users#show',as: :profile
286
+
287
+ get '/profile/edit', to:'users#edit',as: :profile_edit
288
+
289
+ get '/follower_list/(:id)', to:'users#follower_list',as: :follower_list
290
+
291
+ get '/follow_list/(:id)', to:'users#follow_list',as: :follow_list
292
+
293
+ get '/sign_up', to:'users#sign_up',as: :sign_up
294
+
295
+ get '/sign_in', to:'users#sign_in',as: :sign_in
296
+
297
+ get '/sign_out', to:'users#sign_out',as: :sign_out
298
+
299
+ post '/sign_up', to:'users#sign_up_process'
300
+
301
+ post '/sign_in', to:'users#sign_in_process'
302
+
303
+ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
304
+
305
+ end
306
+
307
+ ```
308
+
309
+ ご意見、ご教授お願い致します。