app/sorters/bmc/sorter.rb in bmc-1.5.0 vs app/sorters/bmc/sorter.rb in bmc-1.5.1
- old
+ new
@@ -1,16 +1,17 @@
class BMC::Sorter
include BMC::SortingHelper
- attr_reader :collection, :sort_param, :column, :direction
+ attr_reader :collection, :sort_param, :options, :column, :direction
def self.call(...)
new(...).call
end
- def initialize(collection, sort_param = nil)
- @collection = collection
- @sort_param = sort_param
+ def initialize(collection, sort_param, options = {})
+ @collection = collection
+ @sort_param = sort_param
+ @options = options
@column, @direction = sortable_column_order(sort_param.to_s)
end
def sort
raise NotImplementedError