class JamRuby::TeacherDistribution
  ransacker :teacher_full_name, formatter: proc { |v| v.mb_chars.downcase.to_s } do |parent|
    Arel::Nodes::NamedFunction.new('LOWER',
                                   [Arel::Nodes::NamedFunction.new('concat_ws',
                                                                   [Arel::Nodes::SqlLiteral.new("' '"), 'teachers.first_name', 'teachers.last_name'])])
  end
end
