<% temp1= "secondary" %>
<% @query = "select credentials_id from credentials where credentials_id LIKE '%" + temp1 + "%'" %>
<% Request.connection.execute(@query) %>
<% if @query.blank? %>
<p>These are no secondary users still created </p>
<% else %>
<% @query.each do |c| %>
<%= label_tag(:credentials_id,c.credentials_id)%>
<%end%>
<%end%>
我正在尝试执行上面写在“admin.html.erb”文件中的代码,但出现以下错误:
# 的未定义方法“每个”