items are functional for now
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
class Item < ActiveRecord::Base
|
||||
belongs_to :unit
|
||||
has_many :multi_media_descriptions
|
||||
belongs_to :sub_category
|
||||
|
||||
validates_presence_of :name, :description, :list_price, :current_input_price, :tags, :unit_id, :code
|
||||
validates_presence_of :name, :description, :list_price, :current_input_price, :tags, :unit_id, :code, :sub_category_id
|
||||
end
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
class MultiMediaDescription < ActiveRecord::Base
|
||||
belongs_to :item
|
||||
belongs_to :media_type
|
||||
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
class SubCategory < ActiveRecord::Base
|
||||
belongs_to :category
|
||||
has_many :items
|
||||
belongs_to :sub_category
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user