Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add documentation about add/remove one tag. #307

Closed
wants to merge 1 commit into from

4 participants

@xmonkey

Add examples for adding one tag to tag list and removing one tag from tag list.
Based on the question from stackoverflow
http://stackoverflow.com/questions/2109481/how-can-i-delete-the-tag-from-the-tag-list-of-the-act-as-tagg-plugin

@xmonkey xmonkey Add examples for add/remove tag
Add examples for adding one tag to tag list and removing one tag from tag list.
Based on the answer from stackoverflow
http://stackoverflow.com/questions/2109481/how-can-i-delete-the-tag-from-the-tag-list-of-the-act-as-tagg-plugin
ae77c4d
@phillyslick

This still isn't added to the documentation. Why hasn't this been merged?

@artemk
Collaborator

This pull request cannot be automatically merged.

@tilsammans
Collaborator

The pull request could not be merged because README.rdoc is now README.md.

I updated it manually with the documentation you asked. (which is wrong in this pull request, but correct on stackoverflow)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 7, 2012
  1. @xmonkey

    Add examples for add/remove tag

    xmonkey authored
    Add examples for adding one tag to tag list and removing one tag from tag list.
    Based on the answer from stackoverflow
    http://stackoverflow.com/questions/2109481/how-can-i-delete-the-tag-from-the-tag-list-of-the-act-as-tagg-plugin
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 0 deletions.
  1. +7 −0 README.rdoc
View
7 README.rdoc
@@ -78,6 +78,13 @@ To preserve the order in which tags are created use acts_as_ordered_taggable:
@user.tag_list # => ["north", "east", "south", "west"]
+ @user.tag_list.add = "northeast"
+ @user.tag_list.remove = "east"
+ @user.save
+
+ @user.reload
+ @user.tag_list # => ["north", "south", "west", "northeast"]
+
=== Finding Tagged Objects
Acts As Taggable On utilizes named_scopes to create an association for tags.
Something went wrong with that request. Please try again.