You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/models/attachment_history.rb

24 lines
341 B

class AttachmentHistory < ApplicationRecord
include Publishable
include Publicable
belongs_to :attachment, foreign_key: 'attachment_id'
def title
filename
end
def downloads_count
downloads
end
def quotes_count
quotes.nil? ? 0 : quotes
end
def public?
is_public == 1
end
end