Class: ATDIS::Models::LandTitleRef
- Inherits:
-
ATDIS::Model
- Object
- ATDIS::Model
- ATDIS::Models::LandTitleRef
- Defined in:
- lib/atdis/models/land_title_ref.rb
Instance Attribute Summary
Attributes inherited from ATDIS::Model
#attributes, #attributes_before_type_cast, #json_left_overs, #json_load_error, #timezone, #url
Instance Method Summary collapse
Methods inherited from ATDIS::Model
attribute_keys, attribute_names, cast, cast_datetime, cast_geojson, cast_integer, cast_string, cast_uri, hash_symbols_to_string, #initialize, interpret, #json_errors, #json_errors_in_children, #json_errors_local, #json_left_overs_is_empty, #json_loaded_correctly!, partition_by_used, read_json, read_url, read_url_raw, #used_attribute?
Constructor Details
This class inherits a constructor from ATDIS::Model
Instance Method Details
#check_title_presence ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/atdis/models/land_title_ref.rb', line 18 def check_title_presence if torrens.nil? && other.nil? errors.add( :torrens, ATDIS::ErrorMessage.new("or other needs be present", "4.3.3") ) end return unless torrens && other errors.add( :torrens, ATDIS::ErrorMessage.new("and other can't both be present", "4.3.3") ) end |