[25856] users/jberry/mpwa/app/models/port_pkg.rb
source_changes at macosforge.org
source_changes at macosforge.org
Sun Jun 3 13:19:17 PDT 2007
Revision: 25856
http://trac.macosforge.org/projects/macports/changeset/25856
Author: jberry at macports.org
Date: 2007-06-03 13:19:17 -0700 (Sun, 03 Jun 2007)
Log Message:
-----------
Fix setting of portpkg name, add remove_tag
Modified Paths:
--------------
users/jberry/mpwa/app/models/port_pkg.rb
Modified: users/jberry/mpwa/app/models/port_pkg.rb
===================================================================
--- users/jberry/mpwa/app/models/port_pkg.rb 2007-06-03 19:31:04 UTC (rev 25855)
+++ users/jberry/mpwa/app/models/port_pkg.rb 2007-06-03 20:19:17 UTC (rev 25856)
@@ -106,7 +106,7 @@
self.submitter = Person.ensure_person_with_email(meta.submitter_email, meta.submitter_name)
self.submitter_notes = meta.submitter_notes
- self.name = name
+ self.name = meta.name
self.short_desc = meta.short_desc
self.long_desc = meta.long_desc
self.home_page = meta.home_page
@@ -170,6 +170,10 @@
self.tags << Tag.find_or_create_by_name(name) unless has_tag name
end
+ def remove_tag(name)
+ self.tags.select { |t| t.name == name }.each { |t| self.tags.delete(t) }
+ end
+
def <=>(other)
self.id <=> other.id
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070603/bb7c6d17/attachment.html
More information about the macports-changes
mailing list