I have been looking online about how to do queries for Ruby on Rails and I can find information how to build the query but not where I put the physical code. I am very new to Ruby on Rails.
I have one database called story and it has the title and content columns that I made. I have a page that is used to input the title and content and then stored into the database and then I have a page which displays all contents of the database but I do not understand how to do a query to find let's say, "a record that has a content or title that contains a certain word or phrase"
<%= @story.content %>
So i understand that displays the content on the screen, do i just do the same thing for queries?