@video = Video.find(params[:id])
@lengths = @video.each do |i|
@length = i.length * 60
end
Firstly, I presumed @video would have an each, but instead got this error:
undefined method `each' for #<Video:0x4738428>
Secondly, is there any Ruby one-liner magic that could substitute for the last 3 lines?