Skip to content

Commit

Permalink
Support array of contexts in owner_tags_on method
Browse files Browse the repository at this point in the history
  • Loading branch information
Divya Kunnath authored and Divya Kunnath committed Jul 21, 2016
1 parent 2ec0f44 commit 2cfc7d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/acts_as_taggable_on/taggable/ownership.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ def owner_tags(owner)
end

def owner_tags_on(owner, context)
scope = owner_tags(owner).where([%(#{ActsAsTaggableOn::Tagging.table_name}.context = ?), context.to_s])
scope = owner_tags(owner).where(
"#{ActsAsTaggableOn::Tagging.table_name}" => {
context: context
}
)
end

def cached_owned_tag_list_on(context)
Expand Down

0 comments on commit 2cfc7d1

Please sign in to comment.