Sha256: 80e3b5d060f0f8f40b2ef6e4757f0107f53aceb8f555580ee15a29099d8b92df

Contents?: true

Size: 610 Bytes

Versions: 16

Compression:

Stored size: 610 Bytes

Contents

module RealmTheme
  extend ActiveSupport::Concern
  included do
    remove_const(:TYPES)
    const_set(:TYPES, ["Red Hat Identity Management", "Active Directory"])
    #removed validator that was using the old TYPES const
    Realm.class_eval do
      _validators.delete(:realm_type)
      _validate_callbacks.each do |callback|
        if callback.raw_filter.respond_to? :attributes
          callback.raw_filter.attributes.delete :realm_type
        end
      end
      validates :realm_type, :presence => true, :inclusion => { :in => ["Red Hat Identity Management", "Active Directory"] }
    end
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
foreman_theme_satellite-13.3.5 app/models/concerns/realm_theme.rb
foreman_theme_satellite-13.3.4 app/models/concerns/realm_theme.rb
foreman_theme_satellite-13.3.3 app/models/concerns/realm_theme.rb
foreman_theme_satellite-14.1.0 app/models/concerns/realm_theme.rb
foreman_theme_satellite-13.3.2 app/models/concerns/realm_theme.rb
foreman_theme_satellite-13.3.1 app/models/concerns/realm_theme.rb
foreman_theme_satellite-14.0.1 app/models/concerns/realm_theme.rb
foreman_theme_satellite-14.0.0 app/models/concerns/realm_theme.rb
foreman_theme_satellite-13.3.0 app/models/concerns/realm_theme.rb
foreman_theme_satellite-13.2.5 app/models/concerns/realm_theme.rb
foreman_theme_satellite-13.2.4 app/models/concerns/realm_theme.rb
foreman_theme_satellite-13.2.3 app/models/concerns/realm_theme.rb
foreman_theme_satellite-13.2.2 app/models/concerns/realm_theme.rb
foreman_theme_satellite-13.2.1 app/models/concerns/realm_theme.rb
foreman_theme_satellite-13.2.0 app/models/concerns/realm_theme.rb
foreman_theme_satellite-13.1.0 app/models/concerns/realm_theme.rb