Skip to content

Instantly share code, notes, and snippets.

@johnbender
Created March 22, 2009 05:10
Show Gist options
  • Save johnbender/83081 to your computer and use it in GitHub Desktop.
Save johnbender/83081 to your computer and use it in GitHub Desktop.
#Users who's last logon was in '05
#ActiveRecord
User.find(:all, :conditions => ["last_logon between ? and ?", "2005-01-01", "2005-12-31"])
#rquery
User.where {
:last_logon.between "2005-01-01", "2005-12-31"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment