Sha256: 471c4567af07fc0c59414b46b8ed10e107609de9970a8cd871589c0588bfa722
Contents?: true
Size: 511 Bytes
Versions: 12
Compression:
Stored size: 511 Bytes
Contents
module ActiveScaffoldSortable module AttributeParams def update_column_from_params(parent_record, column, attribute, avoid_changes = false) super.tap do |value| if column.association.try(:collection?) config = active_scaffold_config_for(column.association.klass) if config.actions.include?(:sortable) parent_record.association(column.association.name).target = value.sort_by(&config.sortable.column.name) end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems