I want to implement a search function in rails under the following conditions, but I do not know what kind of column should be set and what kind of condition should be entered in the controller.

・ Use of search controller
・ Use of form_with
・ Do not use ransack
-For the input value of the form, "Registered user name" or "Title of posted post", and whether it is "Exact match", "Starting match", "Ending match", "Partial match" You can narrow down your search with two types of pull-downs, such as

When implementing the search function under the above conditions, what steps should be taken to implement it?
Thanks for your guidance.

(Specifically, I would be very grateful if you could teach me the columns required to be registered in the search model, the contents to be entered in the search controller, how to write the search function using form_widh, etc.)

  • Answer # 1

    Excuse me, I will proceed so that I can resolve myself

Related articles