0

当我尝试为我的一个网格列实现排序范围时,它总是会抛出一个错误,如NoMethodError (undefined methodto_sym' for #)`

我的代码是

{  
:name => :id,  
:text => "Title",     
:sorting_scope => lambda {|r| r.order("id desc") }  
}
4

1 回答 1

1

目前sorting_scope对于列只能直接接受模型上定义的范围名称,请参见文档中的示例:https://github.com/netzke/netzke-basepack/blob/master/lib/netzke/basepack/grid。 rb#L150

于 2014-02-11T13:50:42.000 回答