app/models/tramway/event/partaking.rb in tramway-event-1.6.4 vs app/models/tramway/event/partaking.rb in tramway-event-1.7
- old
+ new
@@ -1,4 +1,6 @@
class Tramway::Event::Partaking < ::Tramway::Core::ApplicationRecord
- belongs_to :section, class_name: 'Tramway::Event::Section'
+ belongs_to :part, polymorphic: true
+ enumerize :part_type, in: [ 'Tramway::Event::Event', 'Tramway::Event::Section' ]
+
belongs_to :person, class_name: 'Tramway::Event::Person'
end