lib/acts_as_data_table/scope_filters/validator.rb
def validate
          validations = Acts::DataTable::ScopeFilters::ActiveRecord.filter_options(@model, @group, @scope)[:validate]

          Array(validations).inject([]) do |res, proc|
            res += run_validation(proc)
            res
          end.uniq.compact
        end
#
# Validates the given scope filter and returns possible error messages
#
# @see {Acts::DataTable::ScopeFilters::ActiveRecord}#register_filter for arguments
#
Validates the given scope filter and returns possible error messages
Validates the given scope filter and returns possible error messages
def validate
          validations = Acts::DataTable::ScopeFilters::ActiveRecord.filter_options(@model, @group, @scope)[:validate]
          Array(validations).inject([]) do |res, proc|
            res += run_validation(proc)
            res
          end.uniq.compact
        end
def validate validations = Acts :: DataTable :: ScopeFilters :: ActiveRecord . filter_options ( @model , @group , @scope ) [ :validate ] Array ( validations ) . inject ( [ ] ) do | res , proc | res += run_validation ( proc ) res end . uniq . compact end
Validates the given scope filter and returns possible error messages
Validates the given scope filter and returns possible error messages
see
{Acts::DataTable::ScopeFilters::ActiveRecord}#register_filter for arguments
{ Acts :: DataTable :: ScopeFilters :: ActiveRecord } #register_filter for arguments