rubocop fixing

This commit is contained in:
Aaro Koivukangas
2023-08-10 18:13:37 +03:00
parent 46b8502bd9
commit a8180ac3f7
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -7,8 +7,7 @@ class Brewery < ApplicationRecord
validates :name, presence: true
validates :year, numericality: { greater_than_or_equal_to: 1040,
less_than_or_equal_to: 2023,
only_integer: true
}
only_integer: true }
def print_report
puts name
puts "established at year #{year}"
+1 -2
View File
@@ -4,8 +4,7 @@ class Rating < ApplicationRecord
validates :score, numericality: { greater_than_or_equal_to: 1,
less_than_or_equal_to: 50,
only_integer: true
}
only_integer: true }
def to_s
"#{beer.name}: #{score}"