lib/neo4j/active_node/scope.rb in neo4j-9.3.0 vs lib/neo4j/active_node/scope.rb in neo4j-9.4.0

- old
+ new

@@ -49,17 +49,17 @@ define_method(name) do |*query_params| as(:n).public_send(name, *query_params) end end - # rubocop:disable Style/PredicateName + # rubocop:disable Naming/PredicateName def has_scope?(name) ActiveSupport::Deprecation.warn 'has_scope? is deprecated and may be removed from future releases, use scope? instead.', caller scope?(name) end - # rubocop:enable Style/PredicateName + # rubocop:enable Naming/PredicateName # @return [Boolean] true if model has access to scope with this name def scope?(name) full_scopes.key?(name.to_sym) end @@ -114,16 +114,15 @@ query_proxy_or_target.public_send(method, *args) end end end + # method_missing is not delegated to super class but to aggregated class + # rubocop:disable Style/MethodMissingSuper def method_missing(name, *params, &block) - if query_proxy_or_target.respond_to?(name) - query_proxy_or_target.public_send(name, *params, &block) - else - super - end + query_proxy_or_target.public_send(name, *params, &block) end + # rubocop:enable Style/MethodMissingSuper private def query_proxy_or_target @query_proxy_or_target ||= @query_proxy || @target