test/test_helper.rb in searchkick-0.9.0 vs test/test_helper.rb in searchkick-0.9.1
- old
+ new
@@ -49,10 +49,11 @@
field :name
field :store_id, type: Integer
field :in_stock, type: Boolean
field :backordered, type: Boolean
field :orders_count, type: Integer
+ field :found_rate, type: BigDecimal
field :price, type: Integer
field :color
field :latitude, type: BigDecimal
field :longitude, type: BigDecimal
field :description
@@ -83,31 +84,36 @@
class Product
include NoBrainer::Document
include NoBrainer::Document::Timestamps
+ field :id, type: Object
field :name, type: String
- field :store_id, type: Integer
field :in_stock, type: Boolean
field :backordered, type: Boolean
field :orders_count, type: Integer
+ field :found_rate
field :price, type: Integer
field :color, type: String
field :latitude
field :longitude
field :description, type: String
+
+ belongs_to :store, validates: false
end
class Store
include NoBrainer::Document
+ field :id, type: Object
field :name, type: String
end
class Animal
include NoBrainer::Document
+ field :id, type: Object
field :name, type: String
end
class Dog < Animal
end
@@ -133,9 +139,10 @@
t.string :name
t.integer :store_id
t.boolean :in_stock
t.boolean :backordered
t.integer :orders_count
+ t.decimal :found_rate
t.integer :price
t.string :color
t.decimal :latitude, precision: 10, scale: 7
t.decimal :longitude, precision: 10, scale: 7
t.text :description