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