Newer
Older
# == Schema Information
#
# Table name: downloads
#
# id :integer not null, primary key
# downloadable_id :integer
# downloadable_type :string
# user_id :integer
# created_at :datetime not null
# updated_at :datetime not null
#
# *current_user* download *downloadable*
belongs_to :downloadable, polymorphic: true, counter_cache: true
belongs_to :user
validates_presence_of :user, :downloadable

Israel Barreto Sant'Anna
committed
def recipient
downloadable
end