class Video
Public Instance Methods
file_size()
click to toggle source
# File lib/sinatra/videoman/models/video.rb, line 18 def file_size if thumbnail.file && (thumbnail.file.size.to_f / 2**20).round(2) > Manager.config[:max_video_file_size] errors.add(:thumbnail, "You cannot upload a file greater than #{Manager.config[:max_video_file_size]}MB") end end