Sha256: d8a28ca0abb5d77b404c4e045a2351239be1ec8f5a291caf4e2bf963bb31f3f9
Contents?: true
Size: 524 Bytes
Versions: 36
Compression:
Stored size: 524 Bytes
Contents
# Form Object for the filters form module Effective class DatatableFiltersForm include ActiveModel::Model attr_accessor :scope def initialize(datatable:) # Assign the current value of scope assign_attributes(scope: datatable.state[:scope]) # Create an attr_accesor for each filter and assign value datatable._filters.each do |name, options| self.class.send(:attr_accessor, name) assign_attributes(name => datatable.state[:filter][name]) end end end end
Version data entries
36 entries across 36 versions & 1 rubygems