agenda-libre-ruby/app/models/city.rb

9 lines
249 B
Ruby

# This class is linked to events and organisations
#
# It is mainly used to manage coordinates
#
class City < ApplicationRecord
has_many :events, foreign_key: :city, primary_key: :name
has_many :orgas, foreign_key: :city, primary_key: :name
end