Still a newbie here, but I still couldn't get the logic right.
Currently, I have:
- User has many products.
- Product has 1 user with a price attribute.
I am trying to add on:
- User can offer 1 price on a product sold by another user. User can offer price on multiple products.
- A Product can have many offered price by multiple users.
I have currently come out with:
class User < ActiveRecord::Base has_many :products has_many :offered_prices end class Product < ActiveRecord::Base belongs_to :user has_many :offered_prices end This is what I have done so far. It still doesn't seem quite right as I am rather confused at the same time. Your help is very much appreciated! :)