I'm making a movie introduction site now.
I got movie information from a certain site, including title, movie image, director, release date, and so on.MySQL already has data in the title column, image column, director column, and so on.
I want to match the title to the movie image.
There is an image of the movie in the products table, and the image is now displayed on the website.
And I want to match the title, but I can't do it well.
NoMethodError in ProductsController#index
The error undefined method `order' for appears.
I think the new(@title) when defining the @products variable is wrong, but I don't know how to describe this part.ruby-on-rails
Product.new(@title) did not understand what they wanted to do.
I think I can use the following code to get 20 items and rearrange them.
© 2022 OneMinuteCode. All rights reserved.