% if asset.blank? and @asset.present? then asset = @asset end %> <% is_image = asset.is_image? %> <% timestamp = asset.created_at %> <% icon_class = is_image ? 'glyphicon-picture' : 'glyphicon-file' %>