Sha256: 52a4d1f39a0088276e17fa44ce406abf120afe2a560a52b2e8778178723f8e0d
Contents?: true
Size: 1.02 KB
Versions: 3
Compression:
Stored size: 1.02 KB
Contents
<%% if @<%= instance_name %>.errors.blank? %> // Fill the right box with first <%= instance_name %> details $('#div_<%= instance_name %>_details').html("<%%= escape_javascript(render(:partial=>'show')) %>"); // Add the newly created item to the list $("#div_<%= instance_name %>_collections").prepend("<div id=\"div_<%= instance_name %>_<%%= @<%= instance_name %>.id %>\"><%%= escape_javascript(render(:partial => 'item', :locals => { :<%= instance_name %> => @<%= instance_name %> })) %></div>") $("#div_<%= instance_name %>_empty").hide(); // Close Modal closeModal(); <%% else %> // Show the new form in the pop up form. heading = "Create <%= model_class.titleize %>"; bodyContent = "<%%= escape_javascript(render(:partial=>"form")) %>"; showModal(heading, bodyContent); validate<%= model_class %>Form(); // Populate Server Side Errors errorMessages = <%%= @<%= instance_name %>.errors.full_messages.to_json.html_safe %>; populateServerSideErrors('<%= instance_name %>', errorMessages); <%% end %>
Version data entries
3 entries across 3 versions & 1 rubygems