mitijain123/mongoid_dynamic_finder — pull request #1 by iwinux (2011-11-22 02:21:17+00:00)
Title: add support for bang methods

As stated in https://github.com/mongoid/mongoid/pull/1050#issuecomment-2811586

Example:

```ruby
user = User.find_by_email("abc@abc.com") # => user

user = User.find_by_email("nonexisted@abc.com") # => nil

user = User.find_by_email!("nonexisted@abc.com") # raises exception DocumentNotFound
```

Also, **if either 'first', 'all', or 'last' is not specified, it will be default to 'first'**. e.g. ``find_by_email`` is the same as ``find_first_by_email``.