myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2917] trunk/vendor/plugins/acts_as_taggable_redu


From: noreply
Subject: [myexperiment-hackers] [2917] trunk/vendor/plugins/acts_as_taggable_redux/lib/acts_as_taggable.rb: fixed bug in update_tags when there were no tags to begin with
Date: Fri, 20 Jan 2012 11:21:34 -0500 (EST)

Revision
2917
Author
dgc
Date
2012-01-20 11:21:34 -0500 (Fri, 20 Jan 2012)

Log Message

fixed bug in update_tags when there were no tags to begin with

Modified Paths

Diff

Modified: trunk/vendor/plugins/acts_as_taggable_redux/lib/acts_as_taggable.rb (2916 => 2917)


--- trunk/vendor/plugins/acts_as_taggable_redux/lib/acts_as_taggable.rb	2012-01-20 16:04:58 UTC (rev 2916)
+++ trunk/vendor/plugins/acts_as_taggable_redux/lib/acts_as_taggable.rb	2012-01-20 16:21:34 UTC (rev 2917)
@@ -124,7 +124,9 @@
               #taggings.reset
               address@hidden = nil
               
-              old_tag_ids = self.tags.collect { |t| t.id }
+              existing_tags = self.tags || []
+
+              old_tag_ids = existing_tags.collect { |t| t.id }
               Tag.parse(@new_tag_list).each do |new_tag_name|
                 found = Tag.find_or_create_by_name(new_tag_name)
                 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]