search for: localize_error_messages

Displaying 4 results from an estimated 4 matches for "localize_error_messages".

2009 May 15
0
[PATCH server] use service layer for Network controller.
...render :json => { :object => "network", :success => true, - :alert => alert } - rescue - render :json => { :object => "network", :success => false, - :errors => - @network.errors.localize_error_messages.to_a } - end - end + def create + alert = svc_create(params[:network]) + render :json => { :object => "network", :success => true, :alert => alert } + end - def edit - @network = Network.find(params[:id]) + def edit + svc_modify(params[:id]) @usag...
2009 May 19
1
re-sending outstanding controller refactoring patches after rebase
I've rebased the patch series to the current next branch and am sending them again.
2009 Jul 07
0
[PATCH server] Update app to work with rails 2.3.2
...ce_errors - hash = {} - instance_variables.each do |ivar| - val = instance_variable_get(ivar) - if val && val.respond_to?(:errors) && val.errors.size > 0 - hash[:object] = ivar[1, ivar.size] - hash[:errors] ||= [] - hash[:errors] += val.errors.localize_error_messages.to_a - end - end - return hash - end -end diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb new file mode 100644 index 0000000..e50f71e --- /dev/null +++ b/src/app/controllers/application_controller.rb @@ -0,0 +1,200 @@ +# +# Copy...
2009 Jul 20
9
Upgrade server to run on Rails 2.3.2/F11
Note that one of the 8 patches (#6) will be sent separately in reply to this email, as some of the replaced lines are too long, so git won't let me send the email. However, there is nothing wrong with that patch, and it should be applied in the sequence listed below. Note also that I assume this will be tested on a clean f11 install, rather than an upgrade of an existing ovirt server