action-store 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +6 -1
- data/README.md +15 -3
- data/lib/action-store.rb +3 -1
- data/lib/action_store/model.rb +2 -2
- data/lib/action_store/version.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09651bb0002d5efaf81354d1b4ba5b62d62576a4'
|
4
|
+
data.tar.gz: 1d12ed61cdc42e0ff7d6c8d7fe9c63c09aee67bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbee1cd45d4e30fab4f567745a4f4001048d7975b204f6810cba737b18e2af82d35e1bb7d9adef4d8e4851260950b70971381ba4612a1e6128fa664d17f57b95
|
7
|
+
data.tar.gz: c2fb0eca774924249021e6db24843643e49e9461c49fd717a1e2a862fabf4c3dfa0ab47f01d9c0bedf606905ea91ff844c93190316a79296680f4061556471b8
|
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
ActionStore
|
2
2
|
-----------
|
3
3
|
|
4
|
-
[![Gem Version](https://badge.fury.io/rb/action-store.svg)](https://badge.fury.io/rb/action-store) [![Build Status](https://travis-ci.org/rails-engine/action-store.svg)](https://travis-ci.org/rails-engine/action-store) [![Code Climate](https://codeclimate.com/github/rails-engine/action-store/badges/gpa.svg)](https://codeclimate.com/github/rails-engine/action-store) [![codecov.io](https://codecov.io/github/rails-engine/action-store/coverage.svg?branch=master)](https://codecov.io/github/rails-engine/action-store?branch=master)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/action-store.svg)](https://badge.fury.io/rb/action-store) [![Build Status](https://travis-ci.org/rails-engine/action-store.svg)](https://travis-ci.org/rails-engine/action-store) [![Code Climate](https://codeclimate.com/github/rails-engine/action-store/badges/gpa.svg)](https://codeclimate.com/github/rails-engine/action-store) [![codecov.io](https://codecov.io/github/rails-engine/action-store/coverage.svg?branch=master)](https://codecov.io/github/rails-engine/action-store?branch=master)
|
5
5
|
|
6
|
-
Store
|
6
|
+
Store different kind of actions (Like, Follow, Star, Block ...) in one table via ActiveRecord Polymorphic Association.
|
7
7
|
|
8
8
|
- Like Post/Comment/Reply ...
|
9
9
|
- Watch/Subscribe Post
|
@@ -13,6 +13,8 @@ Store difference kind of actions (Like, Follow, Star, Block ...) in one table vi
|
|
13
13
|
|
14
14
|
And more and more.
|
15
15
|
|
16
|
+
[中文介绍和使用说明](https://ruby-china.org/topics/32262)
|
17
|
+
|
16
18
|
## Basic table struct
|
17
19
|
|
18
20
|
| Field | Means |
|
@@ -29,6 +31,16 @@ gem 'action-store'
|
|
29
31
|
|
30
32
|
and run `bundle install`
|
31
33
|
|
34
|
+
Generate Migrations:
|
35
|
+
|
36
|
+
```
|
37
|
+
$ rails g action_store:install
|
38
|
+
create config/initializers/action_store.rb
|
39
|
+
migration 20170208024704_create_actions.rb from action_store
|
40
|
+
```
|
41
|
+
|
42
|
+
and run `rails db:migrate`.
|
43
|
+
|
32
44
|
### Define Actions
|
33
45
|
|
34
46
|
You can use `action_store` to define actions:
|
@@ -175,4 +187,4 @@ And `User` model will have methods:
|
|
175
187
|
- @user.unblock_user(@user1)
|
176
188
|
- @user.like_post_ids
|
177
189
|
- @user.block_user_ids
|
178
|
-
- @user.block_by_user_ids
|
190
|
+
- @user.block_by_user_ids
|
data/lib/action-store.rb
CHANGED
data/lib/action_store/model.rb
CHANGED
data/lib/action_store/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module ActionStore
|
2
|
-
VERSION = "0.2.
|
3
|
-
end
|
2
|
+
VERSION = "0.2.1"
|
3
|
+
end
|