Skip to content

Commit

Permalink
Merge pull request #800 from ashishg-qburst/master
Browse files Browse the repository at this point in the history
Fix typo in README
  • Loading branch information
seuros authored May 6, 2017
2 parents c498440 + ac2fb95 commit 9073520
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,12 @@ Note that **owned tags** are added all at once, in the form of ***comma seperate
Also, when you try to add **owned tags** again, it simply overwrites the previous set of **owned tags**.
So to append tags in previously existing **owned tags** list, go as follows:
```ruby
def add_owned_tag
def add_owned_tag
@some_item = Item.find(params[:id])
owned_tag_list = @some_item.all_tag_list - @some_item.tag_list
owned_tag_list = @some_item.all_tags_list - @some_item.tag_list
owned_tag_list += [(params[:tag])]
@tag_owner.tag(@some_item, :with => stringify(owned_tag_list), :on => :tags)
@some_item.save
@some_item.save
end

def stringify(tag_list)
Expand All @@ -379,12 +379,12 @@ end
##### Removing owned tags
Similarly as above, removing will be as follows:
```ruby
def remove_owned_tag
def remove_owned_tag
@some_item = Item.find(params[:id])
owned_tag_list = @some_item.all_tag_list - @some_item.tag_list
owned_tag_list = @some_item.all_tags_list - @some_item.tag_list
owned_tag_list -= [(params[:tag])]
@tag_owner.tag(@some_item, :with => stringify(owned_tag_list), :on => :tags)
@some_item.save
@some_item.save
end
```

Expand Down

0 comments on commit 9073520

Please sign in to comment.