module VideosHelper

Public Instance Methods

directory_column(record) click to toggle source
# File app/helpers/videos_helper.rb, line 13
def directory_column(record)
  if record.kind_of?( Video )
    h( record.image.directory )
  else
    h( record.directory )
  end
end
duration_column(record) click to toggle source
# File app/helpers/videos_helper.rb, line 37
def duration_column(record)
  seconds_to_time(record.duration)
end
filename_column(record) click to toggle source
# File app/helpers/videos_helper.rb, line 21
def filename_column(record)
  if record.kind_of?( Video )
    h( record.image.filename )
  else
    h( record.filename )
  end
end
pixel_format_column(record) click to toggle source
# File app/helpers/videos_helper.rb, line 29
def pixel_format_column(record)
  h( record.pixel_format.name )
end
start_column(record) click to toggle source
# File app/helpers/videos_helper.rb, line 33
def start_column(record)
  seconds_to_time(record.start)
end
thumbnail_column(record) click to toggle source
# File app/helpers/videos_helper.rb, line 3
def thumbnail_column(record)
  if record.kind_of?( Image )
    img = record
  else
    img = record.image
  end
  img.create_png
  image_tag( "dbimage-#{img.id}.png")
end