First, you need two columns on bugs table, creator_id and assignee_id. Then you just create following relationships:
class User < ActiveRecord::Base
has_many :created_bugs, :class_name => 'Bug', :foreign_key => :creator_id
has_many :assigned_bugs, :class_name => 'Bug', :foreign_key => :assignee_id
end
class Bug < ActiveRecord::Base
belongs_to :creator, :class_name => 'User'
belongs_to :assignee, :class_name => 'User'
end