Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise an ArgumentError if user passing less number of argument in the dynamic finder #2128

Merged
merged 3 commits into from Jul 18, 2011

Commits on Jul 17, 2011

  1. Raise an ArgumentError if user passing less number of argument in the…

    … dynamic finder
    
    The previous behavior was unintentional, and some people was relying on it. Now the dynamic finder will always expecting the number of arguments to be equal or greater (so you can still pass the options to it.)
    
    So if you were doing this and expecting the second argument to be nil:
    
        User.find_by_username_and_group("sikachu")
    
    You'll now get `ArgumentError: wrong number of arguments (1 for 2).` You'll then have to do this:
    
        User.find_by_username_and_group("sikachu", nil)
    sikachu committed Jul 17, 2011
    Copy the full SHA
    6e69949 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    1ccca1b View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2011

  1. Copy the full SHA
    4443905 View commit details
    Browse the repository at this point in the history