diff --git a/app/controllers/admin/resource_controller.rb b/app/controllers/admin/resource_controller.rb index b47336f0d1..b15a576f40 100644 --- a/app/controllers/admin/resource_controller.rb +++ b/app/controllers/admin/resource_controller.rb @@ -146,7 +146,7 @@ module Admin return nil if parent_data.blank? @parent ||= parent_data[:model_class]. - public_send("find_by", parent_data[:find_by] => params["#{model_name}_id"]) + find_by(parent_data[:find_by] => params["#{model_name}_id"]) instance_variable_set("@#{model_name}", @parent) end diff --git a/lib/reporting/queries/query_builder.rb b/lib/reporting/queries/query_builder.rb index 02e908ab2d..23697a6824 100644 --- a/lib/reporting/queries/query_builder.rb +++ b/lib/reporting/queries/query_builder.rb @@ -15,7 +15,7 @@ module Reporting end def selecting(lambda) - fields = instance_exec(&lambda).map{ |key, value| value.public_send(:as, key.to_s) } + fields = instance_exec(&lambda).map{ |key, value| value.as(key.to_s) } reflect query.project(*fields) end diff --git a/lib/spree/authentication_helpers.rb b/lib/spree/authentication_helpers.rb index f463ebbdb4..d92febf78d 100644 --- a/lib/spree/authentication_helpers.rb +++ b/lib/spree/authentication_helpers.rb @@ -3,9 +3,9 @@ module Spree module AuthenticationHelpers def self.included(receiver) - receiver.public_send :helper_method, :spree_current_user - receiver.public_send :helper_method, :spree_login_path - receiver.public_send :helper_method, :spree_logout_path + receiver.helper_method :spree_current_user + receiver.helper_method :spree_login_path + receiver.helper_method :spree_logout_path end def spree_current_user diff --git a/spec/swagger_helper.rb b/spec/swagger_helper.rb index 0a131fb5ff..b3a3676cbc 100644 --- a/spec/swagger_helper.rb +++ b/spec/swagger_helper.rb @@ -75,7 +75,7 @@ end module RswagExtension def param(args, &) - public_send(:let, args) { instance_eval(&) } + let(args) { instance_eval(&) } end end Rswag::Specs::ExampleGroupHelpers.prepend RswagExtension