Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding instance method has_tag? #14

Open
mattiassvedhem opened this issue Feb 21, 2012 · 1 comment
Open

Adding instance method has_tag? #14

mattiassvedhem opened this issue Feb 21, 2012 · 1 comment

Comments

@mattiassvedhem
Copy link

Is this something that could be added to the gem?

  # Public: Checks whether the subject has a tag or not
  #
  # tag - The Symbol name of the tag
  #
  # Returns Boolean
  def has_tag?(tag)
    self.tag_array_attributes.any? { |a| self.send(a).include?(tag.to_s) }
  end
@aq1018
Copy link
Owner

aq1018 commented Feb 23, 2012

I don't consider this a core feature, so I feel there is no need to put it in at this stage.

I'll keep this ticket open and if more people are requesting for this feature, then I will add it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants