Question

I want to display the records returned by following line in html,

       @var = User.where("first_name like ?", "%"+params[:searchTextField]+"%")

How do i display these in html?

Was it helpful?

Solution

Like this

<% @var.each do |v| %>
  <%= v.first_name %>
  <%= ... %>
<% end %>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top