mongoid-likeable 4.1 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/LICENSE +1 -1
- data/README.md +4 -7
- data/mongoid-likeable.gemspec +2 -2
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6819b72f8ebb359033d604d410128de0fd0298ee
|
4
|
+
data.tar.gz: 10968b40eae37c16ba2d1104a97e5efc0027398a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2ffb6a578130a79ded94999ab1d973cd3881ca12e61ddc54a518e24da1410821735d493d07581d4953ccee9d2b2bc7132132c73c85dee17807227bc6eb0b5cd
|
7
|
+
data.tar.gz: 307beec9abfd252962f93c0c238ef1cce30a14c7e29a9e3beb18356f469aa782ce552474d92afb36d12edc469c3d7046e4a77c75f53f31b95426468750ac4667
|
data/CHANGELOG.md
CHANGED
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -39,19 +39,16 @@ end
|
|
39
39
|
You can then like by simply using the `like` method on the model.
|
40
40
|
|
41
41
|
```ruby
|
42
|
-
@story
|
43
|
-
@user
|
44
|
-
|
45
|
-
@story.like @user # you like it
|
46
|
-
@story.unlike @user # you don't like it anymore
|
42
|
+
@story.like @user # @user likes @story
|
43
|
+
@story.unlike @user # @user doesn't like @story anymore
|
47
44
|
```
|
48
45
|
|
49
46
|
You also have access to a helpful method.
|
50
47
|
|
51
48
|
```ruby
|
52
|
-
@story.liked? @user # true if
|
49
|
+
@story.liked? @user # true if @user likes @story
|
53
50
|
```
|
54
|
-
|
51
|
+
Like count is stored in a field called `likes`, so you can sort models by that field.
|
55
52
|
|
56
53
|
**Note** if your users are not stored in a Mongo collection or the ID field is
|
57
54
|
not called `_id` you can still pass the ID in as the second parameter instead.
|
data/mongoid-likeable.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'mongoid-likeable'
|
6
|
-
s.version = '4.
|
6
|
+
s.version = '4.2.0'
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.authors = ['Diowa']
|
9
9
|
s.email = ['dev@diowa.com']
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
|
14
14
|
s.rubyforge_project = 'mongoid-likeable'
|
15
15
|
|
16
|
-
s.add_dependency 'mongoid', '~> 3.1.
|
16
|
+
s.add_dependency 'mongoid', '~> 3.1.4'
|
17
17
|
|
18
18
|
s.add_development_dependency 'database_cleaner'
|
19
19
|
s.add_development_dependency 'rake'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-likeable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Diowa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.1.
|
19
|
+
version: 3.1.4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.1.
|
26
|
+
version: 3.1.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: database_cleaner
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,3 +140,4 @@ signing_key:
|
|
140
140
|
specification_version: 4
|
141
141
|
summary: Add likes to your Mongoid documents
|
142
142
|
test_files: []
|
143
|
+
has_rdoc:
|