module ListRepository
  extend self

  def find_by_date(date)
    ListData.where(date: date)
  end

  def create_empty(title, date)
    ListData.create(title: title, date: date)
  end
end

Add list repository. The repository is an interface to the database and handles mapping entities (pure Ruby objects) to data models (Mongoid documents)
Add list repository. The repository is an interface to the database and handles mapping entities (pure Ruby objects) to data models (Mongoid documents)
