10 lines
188 B
Ruby
10 lines
188 B
Ruby
|
class ExpandableErrorList < ApplicationComponent
|
||
|
def initialize(errors:)
|
||
|
@errors = errors
|
||
|
end
|
||
|
|
||
|
def splitted_errors
|
||
|
yield(Array(@errors[0..2]), Array(@errors[3..]))
|
||
|
end
|
||
|
end
|