lib/ecoportal/api/v2/page/component/action_field.rb in ecoportal-api-v2-0.8.20 vs lib/ecoportal/api/v2/page/component/action_field.rb in ecoportal-api-v2-0.8.21
- old
+ new
@@ -28,9 +28,13 @@
actions.sort_by.with_index do |task, index|
[task.weight, index]
end
end
+ def to_s(delimiter: "\n")
+ ordered_tasks.map(&:to_s).join(delimiter)
+ end
+
# Quick config helper
# @param conf [Symbol, Array<Symbol>]
# - `:requires` required number of completed actions
# - `:all`
# - `#Number`