Adding method to class

Why doesn’t this work:

class AdminController < ApplicationController

def list_pending
@people = Person.get_unapproved
end

class Person < ActiveRecord::Base

def get_unapproved
self.find(:all, :conditions => ‘is_approved = FALSE’, :order =>
‘created_at’)
end

I get an unknown method error! Thanks in advance.

class Person < ActiveRecord::Base

def get_unapproved

Make it…

def self.get_unapproved

-philip

Thanks - that worked.