diff --git a/app/controllers/orgs_controller.rb b/app/controllers/orgs_controller.rb
index 905fd06..4b796cc 100644
--- a/app/controllers/orgs_controller.rb
+++ b/app/controllers/orgs_controller.rb
@@ -32,7 +32,12 @@
if @org.update_attributes(assign_params)
redirect_to admin_show_org_path(params[:id]), notice: I18n.t("admin.org_updated_message")
else
- flash[:notice] = @org.errors.collect{|e| e.message}.join('
').html_safe
+ # For some reason our custom validator returns as a string and not a hash like normal activerecord
+ # errors. We followed the example provided in the Rails guides when building the validator so
+ # its unclear why its doing this. Placing a check here for the data type. We should reasses though
+ # when doing a broader eval of the look/feel of the site and we come up with a standardized way of
+ # displaying errors
+ flash[:notice] = @org.errors.collect{|a, e| "#{a} - #{(e.instance_of?(String) ? e : e.message)}"}.join('
').html_safe
render action: "admin_edit"
end
rescue Dragonfly::Job::Fetch::NotFound => dflye