lib/ransack/helpers/form_builder.rb in ransack-2.3.0 vs lib/ransack/helpers/form_builder.rb in ransack-2.3.1

- old
+ new

@@ -5,20 +5,14 @@ # This patch is needed since this Rails commit: # https://github.com/rails/rails/commit/c1a118a class Base private if defined? ::ActiveRecord - if ::ActiveRecord::VERSION::STRING < '5.2' - def value(object) - object.send @method_name if object # use send instead of public_send - end - else # rails/rails#29791 - def value - if @allow_method_names_outside_object - object.send @method_name if object && object.respond_to?(@method_name, true) - else - object.send @method_name if object - end + def value + if @allow_method_names_outside_object + object.send @method_name if object && object.respond_to?(@method_name, true) + else + object.send @method_name if object end end end end end