Skip to content

Commit

Permalink
Change error type
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan committed Nov 13, 2024
1 parent 61b0b50 commit 05cf3de
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/datagrid/form_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def datagrid_get_filter(attribute_or_filter)
return attribute_or_filter unless Utils.string_like?(attribute_or_filter)

object.class.filter_by_name(attribute_or_filter) ||
raise(Error, "Datagrid filter #{attribute_or_filter} not found")
raise(ArgumentError, "Datagrid filter #{attribute_or_filter} not found")
end

def add_html_classes(options, *classes)
Expand All @@ -228,8 +228,5 @@ def render_partial(name, locals)
def add_filter_options(filter, **options)
{ **filter.default_input_options, **filter.input_options, **options }
end

class Error < StandardError
end
end
end

0 comments on commit 05cf3de

Please sign in to comment.