Skip to content

Commit

Permalink
Modified the comment to rightly indicate the error being raised is In…
Browse files Browse the repository at this point in the history
…validFind and not InvalidOptions
  • Loading branch information
adviti-mishra committed Jul 16, 2024
1 parent d2fcc26 commit 6bb8789
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mongoid/criteria/findable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@ def multi_args?(args)
args.size > 1 || !args.first.is_a?(Hash) && args.first.resizable?
end

# Convenience method of raising an invalid options error.
# Convenience method of raising an invalid find error.
#
# @example Raise the error.
# criteria.raise_invalid
#
# @raise [ Errors::InvalidOptions ] The error.
# @raise [ Errors::InvalidFind ] The error.
def raise_invalid
raise Errors::InvalidFind.new
end
Expand Down

0 comments on commit 6bb8789

Please sign in to comment.