[24835] users/jberry/mpwa/app/models/person.rb
source_changes at macosforge.org
source_changes at macosforge.org
Sat May 5 19:08:11 PDT 2007
Revision: 24835
http://trac.macosforge.org/projects/macports/changeset/24835
Author: jberry at macports.org
Date: 2007-05-05 19:08:10 -0700 (Sat, 05 May 2007)
Log Message:
-----------
mpwa: simplify person model
Modified Paths:
--------------
users/jberry/mpwa/app/models/person.rb
Modified: users/jberry/mpwa/app/models/person.rb
===================================================================
--- users/jberry/mpwa/app/models/person.rb 2007-05-06 02:07:03 UTC (rev 24834)
+++ users/jberry/mpwa/app/models/person.rb 2007-05-06 02:08:10 UTC (rev 24835)
@@ -5,12 +5,8 @@
has_and_belongs_to_many :ports, :class_name => 'Port', :join_table => 'maintainers_ports'
has_many :port_pkgs, :foreign_key => 'submitter_id'
- def Person.by_email(email)
- Person.find(:first, :conditions => "email = '#{email}'")
- end
-
def Person.ensure_person_with_email(email, name = nil)
- person = Person.by_email(email)
+ person = Person.find_by_email(email)
if person.nil?
# build a new person using the supplied email address
person = Person.new
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070505/396a83bb/attachment.html
More information about the macports-changes
mailing list