Skip to content

Instantly share code, notes, and snippets.

@marcamillion
Created August 24, 2012 09:54
Show Gist options
  • Save marcamillion/3448461 to your computer and use it in GitHub Desktop.
Save marcamillion/3448461 to your computer and use it in GitHub Desktop.
class Student < ActiveRecord::Base
has_many :grades do
def below_average
where('score < ?', 2)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment