Sha256: 93ff303d8d190e3cf277a600d635783fd1f2352403959402e25dd050746ebf66
Contents?: true
Size: 860 Bytes
Versions: 10
Compression:
Stored size: 860 Bytes
Contents
<%% if @<%= instance_name %>.errors.blank? %> // Fill the right box with first item details $('#div_<%= instance_name %>_details').html("<%%= escape_javascript(render(:partial=>"show")) %>"); // Refresh the updated item in the list $("#div_<%= instance_name %>_<%%= @<%= instance_name %>.id %>").html("<%%= escape_javascript(render :partial => 'item', :locals => { :<%= instance_name %> => @<%= instance_name %> }) %>") <%% else %> // Reload the form partial to display errors $('#div_<%= instance_name %>_details').html("<%%= escape_javascript(render(:partial=>"edit")) %>"); // Validate the form 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
10 entries across 5 versions & 1 rubygems