diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index b66e6ec70..236db227e 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -10,6 +10,10 @@ nav_order: 5 ## main +* Replace usage of `String#ends_with?` with `String#end_with?` to reduce the dependency on ActiveSupport core extensions. + + *halo* + * Don't add ActionDispatch::Static middleware unless `public_file_server.enabled`. *Daniel Gonzalez* diff --git a/lib/view_component/slotable.rb b/lib/view_component/slotable.rb index d46094b3c..b38ab3100 100644 --- a/lib/view_component/slotable.rb +++ b/lib/view_component/slotable.rb @@ -322,7 +322,7 @@ def raise_if_slot_registered(slot_name) end def raise_if_slot_ends_with_question_mark(slot_name) - raise SlotPredicateNameError.new(name, slot_name) if slot_name.to_s.ends_with?("?") + raise SlotPredicateNameError.new(name, slot_name) if slot_name.to_s.end_with?("?") end def raise_if_slot_conflicts_with_call(slot_name)