added some validations to item so that we don't get garbbage

This commit is contained in:
Senad Uka
2015-01-18 10:40:20 +01:00
parent d09bc71aae
commit 2a3c0e24f7
6 changed files with 7 additions and 0 deletions

View File

@@ -1,4 +1,6 @@
class Item < ActiveRecord::Base
belongs_to :unit
has_many :multi_media_descriptions
validates_presence_of :name, :description, :list_price, :current_input_price, :tags, :unit_id, :code
end