Domanda

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?

È stato utile?

Soluzione

Like this

<% @var.each do |v| %>
  <%= v.first_name %>
  <%= ... %>
<% end %>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top