class Babik::Selection::Base
Represents a filter selection (that can be filtered in WHERE)
Public Class Methods
factory(model, selection_path, value)
click to toggle source
Factory Method used to create local and foreign selections
# File lib/babik/queryset/lib/selection/selection.rb, line 11 def self.factory(model, selection_path, value) is_foreign_selection = selection_path.match?(Babik::Selection::Config::RELATIONSHIP_SEPARATOR) return Babik::Selection::ForeignSelection.new(model, selection_path, value) if is_foreign_selection Babik::Selection::LocalSelection.new(model, selection_path, value) end