netzke/netzke-basepack — pull request #80 by firemind (2012-12-20 19:58:31+00:00)
Title: Lambda Filters for Grid Columns

I recently implemented this to be able to define smarter filters on grid columns.

Here is an example that filters by the translation table (using Globalize3) of an associated model (Profession).

```Ruby
{
name: :profession__full,
lfilter: lambda {|rel, value, op|
rel.where(
profession_id: Profession.translation_class.where("name like ?", "%#{value}%")
.collect{|t| t.profession_id }
)
}
}
```

Is this something that would be useful in the Basepack::Grid or should it rather exist as a separate module?