class Flounder::SymbolExtensions::Modifier

Public Instance Methods

to_arel_field(entity) click to toggle source
# File lib/flounder/symbol_extensions.rb, line 4
def to_arel_field entity
  af = case sym
    when Symbol
      entity[sym].arel_field
    when Flounder::Field
      sym.arel_field
    when Flounder::Expression::Expr
      sym.to_immediate.to_arel_field
  else
    fail "ASSERTION FAILURE: Unknown type in field.sym: #{field.sym.inspect}."
  end
end