Commit 4b441d39 authored by April Guian's avatar April Guian

added search

parent d565c5be
...@@ -3,6 +3,10 @@ class CarLogsController < ApplicationController ...@@ -3,6 +3,10 @@ class CarLogsController < ApplicationController
def index def index
@records = CarLog.all @records = CarLog.all
if params[:q].present?
@records = CarLog.where(id: params[:q])
end
render "car_logs/index.html.erb" render "car_logs/index.html.erb"
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment