config.columns[].sort_by :sql
.To make it simpler, I solved the matter including in
ActiveScaffold::DataStructures::Column
amethod:
def sort_as_lob(lenght = 50, offset = 1)which I use on LOBs column declaring in the active scaffold config block:
sort_by :sql => "dbms_lob.substr(#{name},"+
"#{lenght},"+
"#{offset})"
end
active_scaffold do |config|
config.columns[:my_lob].sort_as_lob
end
No comments:
Post a Comment