teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

コードの追加

2023/05/19 04:45

投稿

stmaho
stmaho

スコア1

title CHANGED
File without changes
body CHANGED
@@ -82,7 +82,28 @@
82
82
 
83
83
  end
84
84
  ````
85
+ ```ruoute.rb
86
+ Rails.application.routes.draw do
87
+ devise_for :users, controllers: {
88
+ registrations: 'users/registrations',
89
+ sessions: 'users/sessions'
90
+ }
91
+ unauthenticated do
92
+ as :user do
93
+ root :to => 'devise/registrations#new'
94
+ end
95
+ end
85
96
 
97
+ authenticated :user do
98
+ root :to => 'users#show', as: :authenticated_root
99
+ end
100
+
101
+ resources :exercises
102
+ resources :users
103
+ end
104
+
105
+ ```
106
+
86
107
  ### 試したこと
87
108
 
88
109
  userコントローラー内にdestroyを書いてみたり、

1

誤字

2023/05/18 13:37

投稿

stmaho
stmaho

スコア1

title CHANGED
File without changes
body CHANGED
@@ -86,7 +86,8 @@
86
86
  ### 試したこと
87
87
 
88
88
  userコントローラー内にdestroyを書いてみたり、
89
+ ```show.html.erb
89
- ```<%= link_to "削除", exercise_path(@exercises), method: :delete, class: "nav-send"%>
90
+ <%= link_to "削除", exercise_path(@exercises), method: :delete, class: "nav-send"%>
90
91
  ```
91
92
  ここのパスをuser_pathとしてみたりしましたが、もちろんエラー
92
93
  次に何に修正を入れればいいのか打つ手がありません。