Sounds like you want something like has_many :through.
class Design < ActiveRecord::Base
has_many :sizes, :through => :availability
class Size < ActiveRecord::Base
has_many :designs, :through => :availability
class Availability < ActiveRecord::Base
#You might have to set the table name here.
In the availability table you’ll have a design_id field and a size_id field as well as another field that’s a number, telling you how many of a certain design and size are available.