diff options
Diffstat (limited to 'app/models/clusters/agent.rb')
-rw-r--r-- | app/models/clusters/agent.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/clusters/agent.rb b/app/models/clusters/agent.rb index c21759a3c3b..874415e7bf4 100644 --- a/app/models/clusters/agent.rb +++ b/app/models/clusters/agent.rb @@ -8,6 +8,8 @@ module Clusters has_many :agent_tokens, class_name: 'Clusters::AgentToken' + scope :with_name, -> (name) { where(name: name) } + validates :name, presence: true, length: { maximum: 63 }, |