Sha256: 29606f153fe9aaabdfacd95eb156f3f044f07127104b9973854bdfc889697d2d

Contents?: true

Size: 560 Bytes

Versions: 31

Compression:

Stored size: 560 Bytes

Contents

module Katello
  class Event < Katello::Model
    validate :validate_event_type
    # Note: Do not use active record call backs or dependent references on this class
    # Direct deletes are made in EventQueue#clear_events (instead of destroys).

    def validate_event_type
      unless EventQueue.supported_event_types.include?(self.event_type)
        errors.add(:event_type, _("Unsupported event type %{type}. Supported: %{types}") %
            {:type => self.event_type, :types => EventQueue.supported_event_types.join(',')})
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
katello-3.9.0.rc2 app/models/katello/event.rb
katello-3.9.0.rc1 app/models/katello/event.rb
katello-3.7.1.1 app/models/katello/event.rb
katello-3.7.1 app/models/katello/event.rb
katello-3.8.0 app/models/katello/event.rb
katello-3.8.0.rc3 app/models/katello/event.rb
katello-3.8.0.rc2 app/models/katello/event.rb
katello-3.7.0 app/models/katello/event.rb
katello-3.8.0.rc1 app/models/katello/event.rb
katello-3.7.0.rc2 app/models/katello/event.rb
katello-3.7.0.rc1 app/models/katello/event.rb