# frozen_string_literal: true

# Decorator for students' projects
class ProjectDecorator < Draper::Decorator
  delegate_all

  decorates_association :articles

  def self.collection_decorator_class
    PaginatingDecorator
  end

  def categories_names
    object.categories.map(&:name).join(', ')
  end
end
