2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2024-06-05 18:00:19 +02:00
|
|
|
class ExpandableErrorList < ApplicationComponent
|
|
|
|
def initialize(errors:)
|
|
|
|
@errors = errors
|
|
|
|
end
|
|
|
|
|
|
|
|
def splitted_errors
|
|
|
|
yield(Array(@errors[0..2]), Array(@errors[3..]))
|
|
|
|
end
|
|
|
|
end
|