user_activity 0.1.2 → 0.1.3

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: 0f410352d3ac874f43c5c236a3e62bf124145548
4
- data.tar.gz: 015f34601e3471356422f8eddfb0d0c7450c2a47
3
+ metadata.gz: 30739583ae78074dff366ea0997c8f2b2f22eb94
4
+ data.tar.gz: e17d35d661923d039df68c64cb4bc3b015c2a23e
5
5
  SHA512:
6
- metadata.gz: c338bb0555fe315265e488f7a4647c4d656ccd096918578c8b3fbb9a099aa90c084cd27a5d4eda86ddb07510a60bbd7c353a6451254c38a999ebef667e0a4ee6
7
- data.tar.gz: 5b41461073fff2f8ce16559c88ad139205c18ac84fdef237873aabdd225c45c20ddb94ac8bf4d7a84e500e2d6cf5094ddabf1d8213eb7c918e67065179b66bdd
6
+ metadata.gz: 6b28a96d3610ccc6d4b8b1fd747589ca896c454d6fada0eff2aea20dd7cc0c5640b311c6e28aefabd3a7ee76d3d96550bad48e15df501abf3413777bec732b7c
7
+ data.tar.gz: '03187a867bdf5eb819c3aef5f12cae423082dd93efc90ba82396e4885af61afc5ff618e023f15a195cf096309dae2c6052358c3cd3ed7c86fb6b4056e75d383e'
data/README.md CHANGED
@@ -67,6 +67,17 @@ class ApplicationController < ActionController::Base
67
67
  end
68
68
  ```
69
69
 
70
+ ### Define activity name
71
+ To define activity name and record to database, need to run the command below:
72
+ ```bash
73
+ $ rails generate installer user_activity
74
+ ```
75
+ That will create 2 files.
76
+ - config/initializers/user_activity.rb
77
+ - config/user_activity.yml
78
+
79
+ First is config/initializer/user_activity.rb configuration file that load yml to configuration attribute, the second is config/user_activity.yml this file store activity define and you can define the activity here.
80
+
70
81
  ## Contributing
71
82
  Contribution directions go here.
72
83
 
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
- configuration.activity_define[controller][method]
32
+ configuration.activity_define[controller.to_s][method.to_s]
33
33
  rescue
34
34
  ""
35
35
  end
@@ -1,3 +1,3 @@
1
1
  module UserActivity
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: user_activity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kraiyanat Chomchumpol