Sha256: 22d9c6e267ce8903f4fe9b6fdbcba68c8a766aab27a9aaeb5ce686396c7fb1d2
Contents?: true
Size: 361 Bytes
Versions: 10
Compression:
Stored size: 361 Bytes
Contents
module DefaultSortingConcern extend ActiveSupport::Concern included do scope :sorting, lambda{ |options| attribute = options[:attribute] direction = options[:sorting] attribute ||= "id" direction ||= "DESC" order("#{attribute} #{direction}") } end end
Version data entries
10 entries across 10 versions & 1 rubygems