mongoid-tags-arent-hard 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module Mongoid
|
2
2
|
module TagsArentHard
|
3
3
|
class Tags < BasicObject
|
4
|
+
extend ::Origin::Extensions::Array::ClassMethods
|
4
5
|
|
5
6
|
attr_accessor :tag_list
|
6
7
|
attr_accessor :options
|
@@ -63,6 +64,14 @@ module Mongoid
|
|
63
64
|
!self.==(other)
|
64
65
|
end
|
65
66
|
|
67
|
+
def self.mongoize(object)
|
68
|
+
evolve(object)
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.demongoize(object)
|
72
|
+
object
|
73
|
+
end
|
74
|
+
|
66
75
|
end
|
67
76
|
end
|
68
77
|
end
|
@@ -9,7 +9,7 @@ module Mongoid
|
|
9
9
|
|
10
10
|
def taggable_with(name, options = {})
|
11
11
|
options = {separator: Mongoid::TagsArentHard.config.separator, _name: name}.merge(options)
|
12
|
-
self.field(name, type:
|
12
|
+
self.field(name, type: Mongoid::TagsArentHard::Tags, default: Mongoid::TagsArentHard::Tags.new([], options))
|
13
13
|
self.class_eval do
|
14
14
|
define_method(name) do
|
15
15
|
val = super()
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-tags-arent-hard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mongoid
|