user_activity 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca0ef675a19edb56bccd4933aeb5a52f5afc778c
4
- data.tar.gz: c14aca3b123c5b806626ac68d988f8f73ec49bb1
3
+ metadata.gz: 0f410352d3ac874f43c5c236a3e62bf124145548
4
+ data.tar.gz: 015f34601e3471356422f8eddfb0d0c7450c2a47
5
5
  SHA512:
6
- metadata.gz: 0172e301b263e2f9f9cd6b467aea8f5d28bc3ba9a7420baf97691e4dbe787431de5636ceffc5fc706a29e80e9f472f7b88809f58c1c0986de0446cbecd12ad64
7
- data.tar.gz: 39a697f26056da1c91716ce41ecac37c7d10145e0672f1e0861e382240c8f537996b47a37f5217325b636d1357d881ecb3bc716cedecb379e48692189fbcbd6a
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
- ### Generate database table:
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
- Example in case using Devise
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
- Struct.new(:name, :id).new(current_user.email, current_user.id)
67
- end
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
@@ -29,7 +29,7 @@ module UserActivity
29
29
 
30
30
  def activity_for_user_activity(controller, method)
31
31
  begin
32
- configure.activity_define[controller][method]
32
+ configuration.activity_define[controller][method]
33
33
  rescue
34
34
  ""
35
35
  end
@@ -1,3 +1,3 @@
1
1
  module UserActivity
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
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.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-22 00:00:00.000000000 Z
11
+ date: 2017-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails