I am newbie in Ruby. please help me immediately. I have a input field in
my index page for search a movie by entering the ID of the movie.
the html part of search…
<%= start_form_tag :action => ‘search’ %>
<%= text_field “movie”, “id” %>
<%= submit_tag “Search” %>
<%= end_form_tag %>
query = "select *
where id = ?
@report = Movie.find_by_sql([query, params[:id]])
But it return nothings.
NUll value in params[:id]
How can pass the input value in the find_by_sql() function?
Please please help me immediately.
Thanks in advanced.