class ActiveRecord::Base

Public Class Methods

find_with_order(ids) click to toggle source
# File lib/find_with_order.rb, line 16
def find_with_order(ids)
  return none if ids.blank?
  return FindWithOrder.supporter.find_with_order(self, ids.uniq)
end
none() click to toggle source
# File lib/find_with_order.rb, line 33
def self.none #For Rails 3
  where('1=0')
end
where_with_order(column, ids) click to toggle source
# File lib/find_with_order.rb, line 21
def where_with_order(column, ids)
  return none if ids.blank?
  return FindWithOrder.supporter.where_with_order(self, column, ids.uniq)
end
with_order(column, ids, null_first: false) click to toggle source
# File lib/find_with_order.rb, line 26
def with_order(column, ids, null_first: false)
  FindWithOrder.supporter.with_order(self, column, ids, null_first: null_first)
end