Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # in movies_controller.rb
- def edit
- @movie = Movie.find params[:id]
- end
- def update
- @movie = Movie.find params[:id]
- @movie.update_attributes!(params[:movie])
- flash[:notice] = "#{@movie.title} was successfully updated."
- redirect_to movie_path(@movie)
- end
Add Comment
Please, Sign In to add comment