lib/address.rb in on_the_map-0.1.4 vs lib/address.rb in on_the_map-0.1.5
- old
+ new
@@ -15,9 +15,18 @@
def self.address_fields
%w{street number floor_adr} + geo_address_fields
end
+ def self.type_of name
+ case name.to_sym
+ when :latitude, :longitude, :postal_code
+ :int
+ else
+ :string
+ end
+ end
+
address_fields.each do |name|
field name, type: String
end
field :full, type: String, default: ""
\ No newline at end of file