user_activity 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -7
- data/lib/user_activity.rb +1 -1
- data/lib/user_activity/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f410352d3ac874f43c5c236a3e62bf124145548
|
4
|
+
data.tar.gz: 015f34601e3471356422f8eddfb0d0c7450c2a47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c338bb0555fe315265e488f7a4647c4d656ccd096918578c8b3fbb9a099aa90c084cd27a5d4eda86ddb07510a60bbd7c353a6451254c38a999ebef667e0a4ee6
|
7
|
+
data.tar.gz: 5b41461073fff2f8ce16559c88ad139205c18ac84fdef237873aabdd225c45c20ddb94ac8bf4d7a84e500e2d6cf5094ddabf1d8213eb7c918e67065179b66bdd
|
data/README.md
CHANGED
@@ -9,6 +9,7 @@ Add this line to your application's Gemfile:
|
|
9
9
|
|
10
10
|
```ruby
|
11
11
|
gem 'user_activity'
|
12
|
+
gem 'rails_admin', '~> 1.2 #the dependency gem
|
12
13
|
```
|
13
14
|
|
14
15
|
And then execute:
|
@@ -39,10 +40,7 @@ Rails.application.routes.draw do
|
|
39
40
|
end
|
40
41
|
```
|
41
42
|
### Install initializer files by command below:
|
42
|
-
|
43
|
-
```bash
|
44
|
-
$ rails generate installer user_activity
|
45
|
-
```
|
43
|
+
In order to make the gem work, there is a few think to do following below.
|
46
44
|
|
47
45
|
##Configuration
|
48
46
|
It is posible to config some data in this gem, to do that you can follow the example below:
|
@@ -58,13 +56,13 @@ end
|
|
58
56
|
```
|
59
57
|
|
60
58
|
### To provide user name and user id you need to override controller method "user_for_user_activity"
|
61
|
-
|
59
|
+
Override the method name 'user_for_user_activity'in controller which is return object of Struct with attribures 'name' and 'id'. For example in case using Devise.
|
62
60
|
```ruby
|
63
61
|
class ApplicationController < ActionController::Base
|
64
62
|
...
|
65
63
|
def user_for_user_activity
|
66
|
-
|
67
|
-
|
64
|
+
Struct.new(:name, :id).new(current_user.email, current_user.id)
|
65
|
+
end
|
68
66
|
...
|
69
67
|
end
|
70
68
|
```
|
data/lib/user_activity.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: user_activity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kraiyanat Chomchumpol
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|