Instead of
@the_movie = Movie.where(id: params.fetch(:id)).first
Use
@the_movie = Movie.find_by(id: params.fetch(:id))
Instead of
@the_movie = Movie.where(id: params.fetch(:id)).first
Use
@the_movie = Movie.find_by(id: params.fetch(:id))
For further actions, you may consider blocking this person and/or reporting abuse
S3CloudHub -
John Miller -
Bert De Swaef -
khaled -
Top comments (1)
You can use find() and an integer if you are searching only in the primary key column