Permalink
Fetching contributors…
Cannot retrieve contributors at this time
8 lines (6 sloc) 186 Bytes
class Subscription < ApplicationRecord
belongs_to :rubygem
belongs_to :user
validates :rubygem_id, uniqueness: { scope: :user_id }
validates :user, :rubygem, presence: true
end