2013-07-11 171 views
4

例如,我有:是否有可能重写default_scope在rails_admin?

class Answer 
    include Mongoid::Document 
    default_scope where(status: "active") 
end 

然而,当我有这个班我隐藏的答案,那么没有在rails_admin露面。对此有何建议?

+0

这个答案可以帮助你 http://stackoverflow.com/questions/20069425/how-do-i-show-unscoped-models-in-轨管理员 – kymmt

回答

0

我这样做:

list 
    scopes [:unscoped, :nil, :scope1] 
相关问题