Skip to content
Snippets Groups Projects
Select Git revision
  • 8548481fa152f146e7213cddca5e3b400999c150
  • main default protected
  • 75389691-a67c-422a-91e9-aa58bfb5-main-patch-32205
  • test-pipe
  • extended-scripts
  • structured-badges
  • guix-pipeline
  • cabal-pipeline
8 results

WriteRepo.hs

Blame
  • speaker.rb 499 B
    class Speaker < ApplicationRecord
      belongs_to :conference
      has_many :session_speakers, dependent: :destroy
      has_many :sessions, through: :session_speakers
    
      validates :ref_id, uniqueness: { scope: :conference_id }
    
      after_update :notify_if_changed
    
      def to_param
        ref_id
      end
    
      private
    
      def notify_if_changed
        return if new_record?
        if saved_changes.present?
          ActiveSupport::Notifications.instrument("speaker.updated", record: self, changes: saved_changes)
        end
      end
    end