lib/us_geo/division.rb in us_geo-2.1.0 vs lib/us_geo/division.rb in us_geo-2.1.1
- old
+ new
@@ -4,10 +4,10 @@
# U.S. regional division composed of states.
class Division < BaseRecord
include Population
include Area
- belongs_to :region, inverse_of: :divisions
+ belongs_to :region, optional: true, inverse_of: :divisions
has_many :states, -> { not_removed }, inverse_of: :division
validates :name, presence: true, length: {maximum: 30}, uniqueness: true
# @!attribute id