Skip to content

Commit 3a940a9

Browse files
committed
chore: Refactor nested document class names in airport and hotel models
1 parent c9d4497 commit 3a940a9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/models/airport.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
require 'couchbase-orm'
44

5-
# GeoCoordinates nested document
6-
class GeoCoordinates < CouchbaseOrm::NestedDocument
5+
# AirportGeoCoordinates nested document
6+
class AirportGeoCoordinates < CouchbaseOrm::NestedDocument
77
attribute :lat, :float
88
attribute :lon, :float
99
attribute :alt, :integer
@@ -21,7 +21,7 @@ class Airport < CouchbaseOrm::Base
2121
attribute :faa, :string
2222
attribute :icao, :string
2323
attribute :tz, :string
24-
attribute :geo, :nested, type: GeoCoordinates
24+
attribute :geo, :nested, type: AirportGeoCoordinates
2525

2626
validates :airportname, presence: true
2727
validates :city, presence: true

app/models/hotel.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
class GeoCoordinates < CouchbaseOrm::NestedDocument
1+
class HotelGeoCoordinates < CouchbaseOrm::NestedDocument
22
attribute :lat, :float
33
attribute :lon, :float
44
attribute :accuracy, :string
@@ -76,7 +76,7 @@ def do_something_after_destroy
7676
attribute :checkin, :string
7777
attribute :checkout, :string
7878
attribute :price, :string
79-
attribute :geo, :nested, type: GeoCoordinates
79+
attribute :geo, :nested, type: HotelGeoCoordinates
8080
attribute :type, :string
8181
attribute :country, :string
8282
attribute :city, :string

0 commit comments

Comments
 (0)