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

Relation.where with no args can be chained with not, like, and not_like #8332

Merged
merged 1 commit into from Dec 7, 2012

Commits on Nov 29, 2012

  1. Relation.where with no args can be chained with not, like, and not_like

    examples:
    
      Model.where.not field: nil
      #=> "SELECT * FROM models WHERE field IS NOT NULL
    
      Model.where.like name: 'Jeremy%'
      #=> "SELECT * FROM models WHERE name LIKE 'Jeremy%'
    
    this feature was originally suggested by Jeremy Kemper rails#5950 (comment)
    
    Closes rails#5950
    amatsuda committed Nov 29, 2012
    Copy the full SHA
    de75af7 View commit details
    Browse the repository at this point in the history