You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At this point, maphub does not use error messages at all. Basically, an error would either cause the application to just show the error screen, or in the case of AJAX operations, cause the page to … well, do nothing.
For example, if creating an annotation fails in the controller, it just won't submit the dialog.
Instead, we should include more meaningful error messages. Like those Bootstrap offers:
The only problem is that Rails itself uses a slightly different syntax for errors. The solution would be similar to the one explained here:
For CSS styling with Twitter Bootstrap, create a partial for flash messages in app/views/layouts/_messages.html.erb like this:
<% flash.each do |name, msg| %>
<div class="alert alert-<%= name == :notice ? "success" : "error" %>">
<a class="close" data-dismiss="alert">×</a>
<%= content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String) %>
</div>
<% end %>
I have yet to figure out how to send error messages properly via AJAX.
The text was updated successfully, but these errors were encountered:
At this point, maphub does not use error messages at all. Basically, an error would either cause the application to just show the error screen, or in the case of AJAX operations, cause the page to … well, do nothing.
For example, if creating an annotation fails in the controller, it just won't submit the dialog.
Instead, we should include more meaningful error messages. Like those Bootstrap offers:
The only problem is that Rails itself uses a slightly different syntax for errors. The solution would be similar to the one explained here:
I have yet to figure out how to send error messages properly via AJAX.
The text was updated successfully, but these errors were encountered: