Combine validators for the namespace_id on GeoNodeNamespaceLink model

parent d26af75e
......@@ -2,6 +2,5 @@ class GeoNodeNamespaceLink < ActiveRecord::Base
belongs_to :geo_node, inverse_of: :namespaces
belongs_to :namespace
validates :namespace_id, presence: true
validates :namespace_id, uniqueness: { scope: [:geo_node_id] }
validates :namespace_id, presence: true, uniqueness: { scope: [:geo_node_id] }
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment