ManageIQ/manageiq

View on GitHub
app/models/settings_change.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class SettingsChange < ApplicationRecord
  serialize :value

  validates :key, :format => %r{\A/[^/]+(/[^/]+)*\z}
  belongs_to :resource, :polymorphic => true

  def key_path
    key.to_s.split("/").drop(1).collect(&:to_sym)
  end
end