Update the path when name is changed in item.rb

This commit is contained in:
Christophe Vilayphiou committed 2012-08-08 10:53:04 +08:00
1 parent c8dcc9734d
commit 9982fd880f
1 file changed
+1 -1
+1 -1
View File
@@ -21,7 +21,7 @@ class Item
validates_associated :parent, :children
before_destroy :destroy_children
after_rearrange :rebuild_path, :if => "parent_id_changed?"
after_rearrange :rebuild_path, :if => "parent_id_changed? || name_changed?"
def self.find_by_name(item_name)