15 lines
296 B
Ruby
15 lines
296 B
Ruby
# Copyright (C) 2024 Manuel Bustillo
|
|
|
|
class TablesArrangement < ApplicationRecord
|
|
has_many :seats
|
|
has_many :guests, through: :seats
|
|
|
|
before_create :assign_name
|
|
|
|
private
|
|
|
|
def assign_name
|
|
self.name = "#{Faker::Adjective.positive} #{Faker::Creature::Animal.name}".capitalize
|
|
end
|
|
end
|