Method: Propertyware::SaveBuilding#list_invalid_properties
- Defined in:
- lib/propertyware/models/save_building.rb
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 |
# File 'lib/propertyware/models/save_building.rb', line 387 def list_invalid_properties invalid_properties = Array.new if @abbreviation.nil? invalid_properties.push('invalid value for "abbreviation", abbreviation cannot be nil.') end if @category.nil? invalid_properties.push('invalid value for "category", category cannot be nil.') end if @count_unit.nil? invalid_properties.push('invalid value for "count_unit", count_unit cannot be nil.') end if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end if @portfolio_id.nil? invalid_properties.push('invalid value for "portfolio_id", portfolio_id cannot be nil.') end if @property_type.nil? invalid_properties.push('invalid value for "property_type", property_type cannot be nil.') end if @type.nil? invalid_properties.push('invalid value for "type", type cannot be nil.') end invalid_properties end |