def apply_filter?(records, options = {})
      params[:filter].present? && records.respond_to?(:where) &&
        (options[:filter].nil? || options[:filter])
    end
def apply_filter?(records, options = {})
      params[:filter].present? && records.respond_to?(:where) &&
        (options[:filter].nil? || options[:filter])
    end
Check whether default filters should be applied.

 @param records [ActiveRecord::Relation, Array] collection of records
   e.g.: User.all or [{ id: 1, name: 'Tiago' }, { id: 2, name: 'Doug' }]

 @param options [Hash] JU's options
   e.g.: { filter: false, paginate: false }

 @return [Boolean]

 @api public