Commit e8c1157b by vulehuan

when using mongoid, id not an integer

parent 5e1286bd
......@@ -22,7 +22,7 @@ class Product
validates :user, presence: true
validates :name, :code, :condition, :image_medium, :price, presence: true
validates :name, length: { maximum: 255 }
validates :price, :product_category_id, numericality: true
validates :price, numericality: true
validates :price_currency, presence: true, if: "price > 0"
include Sunspot::Mongoid
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment