Ruby on rails and coupon model
I have really been scratching my head on this and would greatly appreciate help. I have a store setup where people can take courses. I have a course model, order model, and coupon model. Here are the associations in the models class Course < ActiveRecord::Base belongs_to :category has_many :orders has_many :coupons end class Order < ActiveRecord::Base belongs_to :course belongs_to :user belongs_to :coupon end class Coupon < ActiveRecord::Base belongs_to :course has_many :orders end I have a very simple coupon model setup that has code and newprice columns. I want the ability for someone to be