upto 4.2: beer tests

This commit is contained in:
Aaro Koivukangas
2023-08-15 16:04:53 +03:00
parent 76fce1dad2
commit 9a3ae5e0eb
2 changed files with 27 additions and 0 deletions
+1
View File
@@ -6,6 +6,7 @@ class Beer < ApplicationRecord
has_many :users, through: :ratings
validates :name, presence: true
validates :style, presence: true
def to_s
"#{name}, #{(Brewery.find_by_id brewery_id).name}"