Created
October 17, 2016 16:23
-
-
Save lkrych/9b21c80f115b0df691181808a7bf8fcf to your computer and use it in GitHub Desktop.
Create method pulled from movies_controller
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 create | |
@movie = Movie.create!(movie_params) | |
flash[:notice] = "#{@movie.title} was successfully created." | |
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