From 46b3891dffed6936f29a45a0d604fea8ad3d3241 Mon Sep 17 00:00:00 2001 From: João M. M. da Silva + Alessandro Palmeira + Diego Araújo Date: Tue, 2 Oct 2012 17:08:22 -0300 Subject: [PATCH] [Mezuro] alerting error in javascript creation. --- plugins/mezuro/controllers/myprofile/mezuro_plugin_range_controller.rb | 3 ++- plugins/mezuro/views/mezuro_plugin_range/create_range.rjs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/mezuro/controllers/myprofile/mezuro_plugin_range_controller.rb b/plugins/mezuro/controllers/myprofile/mezuro_plugin_range_controller.rb index 0d679f7..3f96398 100644 --- a/plugins/mezuro/controllers/myprofile/mezuro_plugin_range_controller.rb +++ b/plugins/mezuro/controllers/myprofile/mezuro_plugin_range_controller.rb @@ -27,7 +27,8 @@ class MezuroPluginRangeController < MezuroPluginMyprofileController metric_configuration.add_range(@range) metric_configuration.save if metric_configuration_has_errors? metric_configuration - redirect_to_error_page metric_configuration.errors[0].message + @error = metric_configuration.errors[0].message + #redirect_to_error_page metric_configuration.errors[0].message end end diff --git a/plugins/mezuro/views/mezuro_plugin_range/create_range.rjs b/plugins/mezuro/views/mezuro_plugin_range/create_range.rjs index f0cf9ee..6e77ee4 100644 --- a/plugins/mezuro/views/mezuro_plugin_range/create_range.rjs +++ b/plugins/mezuro/views/mezuro_plugin_range/create_range.rjs @@ -1,2 +1,3 @@ +page.alert @error page.visual_effect :toggle_slide, "range_form" page.insert_html :bottom, "ranges", :partial => "range", :locals => {:range => @range} -- libgit2 0.21.2