11 lines
219 B
Ruby
11 lines
219 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ExpandableErrorList < ApplicationComponent
|
|
def initialize(errors:)
|
|
@errors = errors
|
|
end
|
|
|
|
def splitted_errors
|
|
yield(Array(@errors[0..2]), Array(@errors[3..]))
|
|
end
|
|
end
|