We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 088070a commit af076feCopy full SHA for af076fe
app/messages/validators.rb
@@ -242,12 +242,9 @@ def validate(record)
242
243
class OptionsValidator < ActiveModel::Validator
244
def validate(record)
245
-
246
if record.options.blank?
247
# Route Creation with explicit 'null' options is not allowed
248
- if record.is_a?(VCAP::CloudController::RouteCreateMessage) && record.options.nil?
249
- record.errors.add(:options, message: 'is not a valid object')
250
- end
+ record.errors.add(:options, message: 'is not a valid object') if record.is_a?(VCAP::CloudController::RouteCreateMessage) && record.options.nil?
251
return
252
end
253
0 commit comments