Skip to content

Commit

Permalink
Related module preserves ordered tags option
Browse files Browse the repository at this point in the history
Following b9b2747, a spec broke for related when ordered tags are in
use, since the hook for repeated calls of the macro was not maintaining
the preserve order value.

This hook pattern likely needs to be updated throughout the library now
that the `acts_as_ordered_taggable_on` exists as an alternative macro,
but I'm just fixing what broke a spec within the scope of my current
branch.
  • Loading branch information
ches committed Sep 26, 2013
1 parent b9b2747 commit 57fc9a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/acts_as_taggable_on/acts_as_taggable_on/related.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ def find_matching_contexts_for(klass, search_context, result_context, options =
end
end

def acts_as_taggable_on(*args)
super(*args)
private

def taggable_on(ordered, *tag_types)
super(ordered, *tag_types)
initialize_acts_as_taggable_on_related
end
end
Expand Down

0 comments on commit 57fc9a9

Please sign in to comment.