Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan committed Nov 14, 2024
1 parent c133d7e commit f5e082a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/datagrid/drivers/array.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def scope_has_column?(scope, column_name)
scope.any? && scope.first.respond_to?(column_name)
end

def is_timestamp?(scope, column_name)
def timestamp_column?(scope, column_name)
scope_has_column?(scope, column_name) &&
timestamp_class?(get(scope.first, column_name).class)
end
Expand Down
6 changes: 3 additions & 3 deletions lib/datagrid/form_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def datagrid_filter_input(attribute_or_filter, **options, &block)
type = options.delete(:type)&.to_sym
if %i[datetime-local date].include?(type)
if options.key?(:value) && options[:value].nil?
# https://github.com/rails/rails/pull/53387
options[:value] = ""
# https://github.com/rails/rails/pull/53387
options[:value] = ""
end
elsif options[:value]
options[:value] = filter.format(options[:value])
Expand Down Expand Up @@ -82,7 +82,7 @@ def datagrid_filter_input(attribute_or_filter, **options, &block)

protected

def datagrid_enum_checkboxes_filter(filter, options = {}, &block)
def datagrid_enum_checkboxes_filter(filter, options = {})
elements = object.select_options(filter).map do |element|
text, value = @template.send(:option_text_and_value, element)
checked = enum_checkbox_checked?(filter, value)
Expand Down

0 comments on commit f5e082a

Please sign in to comment.