Created
October 17, 2016 16:27
-
-
Save lkrych/fd77b202d3eec9ca6b04d0876074e804 to your computer and use it in GitHub Desktop.
Delete method pulled from movies_controler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MoviesController < ApplicationController | |
| #some code | |
| def destroy | |
| @movie = Movie.find(params[:id]) | |
| @movie.destroy | |
| flash[:notice] = "Movie '#{@movie.title}' deleted." | |
| redirect_to movies_path | |
| end | |
| #some code | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment