Skip to content

Commit

Permalink
Fix reload issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tomeric committed Apr 30, 2010
1 parent 682b1b9 commit 593892e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/acts_as_taggable_on/acts_as_taggable_on/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ def tagging_contexts
custom_contexts + self.class.tag_types.map(&:to_s)
end

def reload
def reload(*args)
self.class.tag_types.each do |context|
instance_variable_set("@#{context.to_s.singularize}_list", nil)
instance_variable_set("@all_#{context.to_s.singularize}_list", nil)
end

super
super(*args)
end

def save_tags
Expand Down
4 changes: 2 additions & 2 deletions lib/acts_as_taggable_on/acts_as_taggable_on/ownership.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ def set_owner_tag_list_on(owner, context, new_list)
cache[owner] = TagList.from(new_list)
end

def reload
def reload(*args)
self.class.tag_types.each do |context|
instance_variable_set("@owned_#{context}_list", nil)
end

super
super(*args)
end

def save_owned_tags
Expand Down

0 comments on commit 593892e

Please sign in to comment.