Skip to content
Snippets Groups Projects
Select Git revision
2 results Searching

ldap_server_entries_modify.ldif

Blame
  • Forked from uffd / uffd
    Source project has a limited visibility.
    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