Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ruby 1.9.2: prefer Array.wrap to [foo].flatten

  • Loading branch information...
commit 2d67ef941670c99d1c02d91a22f24b8d31467884 1 parent f62a883
@jeremy jeremy authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_view/helpers/active_record_helper.rb
View
2  actionpack/lib/action_view/helpers/active_record_helper.rb
@@ -171,7 +171,7 @@ def error_messages_for(*params)
options = params.extract_options!.symbolize_keys
if object = options.delete(:object)
- objects = [object].flatten
+ objects = Array.wrap(object)
else
objects = params.collect {|object_name| instance_variable_get("@#{object_name}") }.compact
end
Please sign in to comment.
Something went wrong with that request. Please try again.