0001-Disable-grouping-for-associations-custom-field.patch

Marius BALTEANU, 2021-04-19 22:25

Download (1.19 KB)

View differences:

app/models/query.rb
179 179
  def initialize(association, custom_field, options={})
180 180
    super(custom_field, options)
181 181
    self.name = "#{association}.cf_#{custom_field.id}".to_sym
182
    # TODO: support sorting/grouping by association custom field
182
    # TODO: support sorting by association custom field
183 183
    self.sortable = false
184 184
    self.groupable = false
185 185
    @association = association
......
194 194
  def css_classes
195 195
    @css_classes ||= "#{@association}_cf_#{@cf.id} #{@cf.field_format}"
196 196
  end
197

  
198
  # TODO: support grouping by association custom field
199
  def groupable?
200
    false
201
  end
197 202
end
198 203

  
199 204
class QueryFilter
200
-