Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

replace present? with any? to reduce dependency on AS

  • Loading branch information...
commit 9a64ffc0c77c2b614401fad665ae2edb33c754a7 1 parent 3c5c93b
Aaron Patterson tenderlove authored
1  actionpack/lib/action_controller/base.rb
View
@@ -1,4 +1,5 @@
require "action_controller/log_subscriber"
+require "action_controller/metal/params_wrapper"
module ActionController
# Action Controllers are the core of a web request in \Rails. They are made up of one or more actions that are executed
2  actionpack/lib/action_controller/metal/params_wrapper.rb
View
@@ -126,7 +126,7 @@ def wrap_parameters(name_or_model_or_options, options = {})
# wrapper key and attribute names. Will be called automatically when the
# module is inherited.
def inherited(klass)
- if klass._wrapper_options[:format].present?
+ if klass._wrapper_options[:format].any?
klass._set_wrapper_defaults(klass._wrapper_options.slice(:format))
end
super

1 comment on commit 9a64ffc

Rafael Mendonça França

Is not better to check empty??

any? will loop on each element.

Please sign in to comment.
Something went wrong with that request. Please try again.