groups of articles now shown on ribica.ba/group/1/, background is in cloudinary

This commit is contained in:
Senad Uka
2015-03-23 07:21:53 +01:00
parent 0ff47313df
commit b534d15866
13 changed files with 143 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ class Item < ActiveRecord::Base
has_many :multi_media_descriptions
belongs_to :sub_category
belongs_to :supplier
has_and_belongs_to_many :item_groups, :join_table => 'item_item_groups'
has_and_belongs_to_many :item_groups, :join_table => 'item_item_groups'
validates_presence_of :name, :description, :list_price, :current_input_price, :tags, :unit_id, :code, :sub_category_id, :weight, :supplier_id

View File

@@ -1,4 +1,5 @@
class ItemGroup < ActiveRecord::Base
has_and_belongs_to_many :items, :join_table => 'item_item_groups'
end