text_field with where to search in rails

1

I'm starting to study rails and I'm trying to search by name and date in a list.

I would like to display on the screen inside the show page this search by name and date

where am I trying to create the form in the view

<form>
<%= text_field(@fees_by_name , "") %>
<%= select_date(@my_date, start_year: Date.today.year - 100, end_year: Date.today.year + 5, order: [:month, :year]) %>
<%= button_to 'Search' %>
</form>

Def on Controller to get global variables

def show
@my_date = params[:date].nil? ? Date.today : DateTime.new(params[:date][:year].to_i, params[:date][:month].to_i)
@fees = @condominium.fees
end
    
asked by anonymous 31.10.2017 / 18:13

0 answers