<% if f.object.errors.any? %>

<%= pluralize(f.object.errors.count, "error") %> prohibited this mail_schedule from being saved:

<% end %>
<%= f.label :file %>
<%= f.file_field :file, :class => "text" %>
Only allowed to upload Image file(.jpg, .jpeg, .gif, .png) and CSS file(.css).
<% if f.object.attributes["file"] %> <% if f.object.image? %> <% end %>

<%= link_to f.object.attributes["file"], f.object.file.url, :target => '_blank' %>

<%= image_tag f.object.file.url, :width => 200 %>
<% end %>
<%= f.submit :class => "button" %>