Sarik_Kumpan

add movie check

Dec 11th, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.27 KB | None | 0 0
  1.     def add_from_tmdb
  2.         movie_id = params[:movie_id]
  3.         if Movie.add_movie_from_tmdb(movie_id)
  4.             flash[:notice] = "Add movie success"
  5.         else
  6.             flash[:warning] = "Add movie fail"
  7.         end
  8.         redirect_to movies_path
  9.     end
Add Comment
Please, Sign In to add comment