削除のリンクを押しても削除することができません。
destroyアクションへのリンクは
<%= link_to '削除', "/tweets/#{tweet.id}", method: :delete %>
コントローラーは
def destroy @tweet.destroy respond_to do |format| format.html { redirect_to tweets_url, notice: 'Tweet was successfully destroyed.' } format.json { head :no_content } end end
となっています。ルーティングは> resources :tweets
にしています。
destroyアクションへのリンクをクリックすると、 Edit | Back とだけ表示されたページが出てきてしまいます。destroy.html.erbは作成してあります。
どうして上手く削除することができないのでしょうか?ご回答お願い致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/05/31 02:51
2017/05/31 02:57
2017/05/31 02:59
2017/05/31 04:13
2017/05/31 06:08
2017/05/31 06:11
2017/05/31 06:13
2017/05/31 06:19
2017/05/31 06:30