I know what I am trying to do is pretty basic but for a newbie like me everything is very daunting right now. Please help me.
The scenario I am trying to program is this. The user enters a string
in the search textfield. I will use his entered value to query the
database for a matched record and then display the attributes of the
fetched record. That is it.
Here is my controller that hopefully on submission from the UI will retrieve the data
===in controller route_controller.rb====
s = params[‘route’][‘name’]
@searched_route = Route.find_by_name(s)