I have two different models.
Item Model
class Item < ActiveRecord::Base
belongs_to :category
attr_accessible :make, :model, :name, :purchasedfrom, :qrcode, :serialnumber, :category_id
end
Event Model
class Event < ActiveRecord::Base
belongs_to :category
attr_accessible :name, :location_id, :category_id
end
I cannot figure out how to do the following:
- An
Event
has multipleItem
that can be at theEvent
. An
Event
history still showsItems
from a particular event.Would show items from event: localhost/event/:id/items
I cannot figure out this for the life of me. If I can get some direction in this issue, I would greatly appreciate it! Thanks in advance for all of your help.
I have seen the use of :through
which I believe I would have to use here.