0
我有不同范围的模型Rails的添加范围Mongoid标准
class Contact
include Mongoid::Document
scope :active
scope :urgent
scope :no_one_in_charge
在我的一些控制的,我拉的活动作用域
my_controller.rb
def my_action
@contacts = Contact.active
现在看来,我想用更具体的范围生成很多表格
my_action.html.erb
<h3>Unassigned</h3>
<%= @contacts.[how Do I add the :no_one_in_charge scope ?] %>
<h3>Urgent</h3>
<%= @contacts.[how Do I add the :urgent scope ?] %>
您可以链接范围正确吗? – 2015-04-05 15:07:25