module ScopedSearch::Model::ClassMethods
Public Instance Methods
scoped_search(options={})
click to toggle source
# File lib/scoped_search_paranoid.rb, line 49 def scoped_search(options={}) options = (options || {}).stringify_keys %w(archived deleted).each do |column_name| if self.column_names.include?("#{column_name}_at") unless ::ActiveRecord::ConnectionAdapters::Column.value_to_boolean(options["with_#{column_name}"]) options["without_#{column_name}"] = true end end end ScopedSearch::Base.new(self, options) end