attachment.nil?
This commit is contained in:
parent
60be338848
commit
7068359e9e
|
@ -1,5 +1,5 @@
|
|||
var fileSpan = $('#attachments_<%= j params[:attachment_id] %>');
|
||||
<% if @attachment.new_record? %>
|
||||
<% if(!@attachment.nil? && @attachment.new_record?) %>
|
||||
fileSpan.hide();
|
||||
alert("<%= escape_javascript @attachment.errors.full_messages.join(', ') %>");
|
||||
<% else %>
|
||||
|
|
Loading…
Reference in New Issue