at first i thought this might be an easy solution but then i realized
that there is a hmt association with users/jobs/projects and that
makes things more difficult.
I will however suggest a change and see if this works for you.
assuming a job is something like "tester", "developer", etc., why not
make "lead" a job as well and remove the lead_id from the project
that would leave you with:
class Project < AR::Base
class Job < AR::Base
class User < AR::Base
has_many :projects, :through => :jobs do
find(:all, :conditions => ["jobs.name = ?", jobname])
find(:all, :conditions => "jobs.name = 'lead'")
then you can use the above association extensions like so:
u = User.find(...)
u.projects # => all projects in which the user has a job
u.projects.by_jobname('developer') # => all projects where user has a
u.projects.lead # => all projects where user has a lead job
you could even do the same with projects to find users based on job.
section on association extensions for more info.
hope this helps