[PATCH conductor 4/7] ensure param processed by ids_list is an array

Mo Morsi mmorsi at redhat.com
Thu May 3 10:46:14 UTC 2012


---
 src/app/controllers/application_controller.rb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb
index 98078e5..7aec876 100644
--- a/src/app/controllers/application_controller.rb
+++ b/src/app/controllers/application_controller.rb
@@ -115,6 +115,7 @@ class ApplicationController < ActionController::Base
 
   # Returns an array of ids from params[:id], params[:ids].
   def ids_list(other_attrs=[])
+    other_attrs = [other_attrs] unless other_attrs.is_a?(Array)
     other_attrs.each do |attr_key|
       return params[attr_key].to_a if params.include?(attr_key)
     end
-- 
1.7.7.6




More information about the aeolus-devel mailing list