mirror of
https://github.com/iritmaximus/brewery.git
synced 2026-10-12 19:13:49 +03:00
rubocop fixing
This commit is contained in:
@@ -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}"
|
||||
|
||||
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user