I am trying to add a filter to my page but the column name I am trying to filter is not part of the object assigned to the Grid. It was dynamically added to the table of results.
Given the object/model: Car
For example this: filter(:status, :enum, select: ['Good', 'Bad']) works fine, as :status is an attribute of Car.
In the case of this filter(:name, :enum, select: ['A1', 'A5']) fails because :name is part of another object and not part of the Car object. Of course this is just a sample object and adding :name is not an option for my real data model.
I am trying to add a filter to my page but the column name I am trying to filter is not part of the object assigned to the Grid. It was dynamically added to the table of results.
Given the object/model: Car
For example this:
filter(:status, :enum, select: ['Good', 'Bad'])
works fine, as :status is an attribute of Car.In the case of this filter(:name, :enum, select: ['A1', 'A5']) fails because :name is part of another object and not part of the Car object. Of course this is just a sample object and adding :name is not an option for my real data model.
Query Error: Car.name Undefined column name.
Can this type of filter be achieved?