Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use respond_to instead of type check. Quack!

  • Loading branch information...
commit 852e95e081cfc6cf80d6ca48f3f7532a57527249 1 parent c4dad60
@carlosantoniodasilva carlosantoniodasilva authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/simple_form/action_view_extensions/builder.rb
View
2  lib/simple_form/action_view_extensions/builder.rb
@@ -117,7 +117,7 @@ def default_html_options_for_collection(item, value, options, html_options) #:no
[:checked, :selected, :disabled].each do |option|
next unless options[option]
- accept = if options[option].is_a?(Proc)
+ accept = if options[option].respond_to?(:call)
options[option].call(item)
else
Array(options[option]).include?(value)
Please sign in to comment.
Something went wrong with that request. Please try again.