Skip to content
Browse files

Use respond_to instead of type check. Quack!

  • Loading branch information...
1 parent c4dad60 commit 852e95e081cfc6cf80d6ca48f3f7532a57527249 @carlosantoniodasilva carlosantoniodasilva committed
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)

0 comments on commit 852e95e

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