paweljw/bookstore-backend

View on GitHub
app/models/author.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

class Author < ApplicationRecord
  has_many :books

  validates :name, presence: true, uniqueness: true

  def to_s
    name
  end
end