This commit is contained in:
2024-09-11 22:41:17 -03:00
parent 3cefdd8f38
commit 2dd0587393
17 changed files with 131 additions and 38 deletions

View File

@ -1,2 +1,3 @@
class Entrega < ApplicationRecord
belongs_to :viaje
end

View File

@ -1,2 +1,3 @@
class Retiro < ApplicationRecord
belongs_to :viaje
end

View File

@ -1,4 +1,6 @@
class Ruta < ApplicationRecord
has_many :viajes
def direccion_inicio
@viajes.first.direccion_partida
end

View File

@ -1,2 +1,5 @@
class Viaje < ApplicationRecord
belongs_to :ruta
has_many :entregas
has_many :retiros
end