Sha256: 2fa7c8c1d764a04dce4dd0dad2daf07b241f7b21bb67815add0288e197982d0c
Contents?: true
Size: 268 Bytes
Versions: 7
Compression:
Stored size: 268 Bytes
Contents
module ActiveHashRelation::SortFilters def apply_sort(resource, params, model = nil) if model.columns.map(&:name).include?(params[:property]) resource = resource.order(params[:property] => (params[:order] || :desc) ) end return resource end end
Version data entries
7 entries across 7 versions & 1 rubygems