mongoid-tags-arent-hard 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -3
- data/lib/mongoid/tags_arent_hard/tags.rb +1 -1
- data/lib/mongoid/tags_arent_hard/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -45,9 +45,9 @@ foo.tags #=> ["a", "b", "c"]
|
|
45
45
|
foo.colors #=> ["red", "blue"]
|
46
46
|
|
47
47
|
# append with either a string or an array:
|
48
|
-
foo.tags
|
49
|
-
foo.tags #=> ["a", "b", "c", "d"]
|
50
|
-
foo.colors
|
48
|
+
foo.tags << "d,e"
|
49
|
+
foo.tags #=> ["a", "b", "c", "d", "e"]
|
50
|
+
foo.colors << ["green", "yellow"]
|
51
51
|
foo.colors #=> ["red", "blue", "green", "yellow"]
|
52
52
|
|
53
53
|
# set with either a string or an array:
|
@@ -4,7 +4,7 @@ module Mongoid
|
|
4
4
|
|
5
5
|
attr_accessor :tag_list
|
6
6
|
attr_accessor :options
|
7
|
-
delegate :join, :map, :each, :inspect, :==, :===, :eql?, :__bson_dump__, to: :tag_list
|
7
|
+
delegate :join, :map, :each, :inspect, :==, :===, :eql?, :__bson_dump__, :delete, :&, :to_ary, to: :tag_list
|
8
8
|
|
9
9
|
def initialize(*tag_list, options)
|
10
10
|
self.options = {separator: Mongoid::TagsArentHard.config.separator}.merge(options)
|