【发布时间】:2011-11-16 13:26:06
【问题描述】:
我正在使用 Ruby 1.8.2 和 Rails 2.3.11。
<% @answered_respondents = Inquiry.find(:all, :conditions => ["question_id = (?) AND is_answered = 1 AND is_denied = 0", q.id]) %>
<% @answered_respondents.each_with_index do |r, i| %>
<% @nene = Respondent.find(:all, :conditions => ["id = (?)", r.respondent_id ]) %>
<% @nene.each do |zz| %>
<span class="statis_answered_resp"><%= zz.email %></span>
<% end %>
<% end %>
我想做什么:我想通过电子邮件对我的用户(zz.email)进行排序。我该怎么做?
【问题讨论】:
标签: ruby-on-rails view sql-order-by