MitinPavel/hello_monument

View on GitHub
app/models/collection.rb

Summary

Maintainability
A
0 mins
Test Coverage
class Collection < ActiveRecord::Base
  belongs_to :user
  has_many :monuments, dependent: :destroy

  validates :name,
            presence: true,
            uniqueness: {scope: :user_id}
end