<% if @ext == 'pdf' %> <%= render partial: 'viewer' %> <% else %> <%=@filename%>

<%=@filename%>

<% if @ext != "png" && @ext != "jpg" && @ext != "bmp" %> <%=@filename%> <% else %> <%=@filename%> <% end %> <% end %>