record_history 0.8.4 → 0.8.5

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.
Files changed (3) hide show
  1. data/README.md +35 -35
  2. data/lib/record_history/version.rb +1 -1
  3. metadata +1 -1
data/README.md CHANGED
@@ -11,39 +11,39 @@ rails g record_history:install
11
11
 
12
12
  ## Usage
13
13
 
14
- # activate history logging for model
15
- class Item < ActiveRecord::Base
16
- has_record_history
17
- end
18
-
19
- # activate history logging for model (only for "name" field)
20
- class Item < ActiveRecord::Base
21
- has_record_history :only => [:name]
22
- end
23
-
24
- # activate history logging for model (except 'name' field)
25
- class Item < ActiveRecord::Base
26
- has_record_history :ignore => [:name]
27
- end
28
-
29
- # activate history logging for model (on update)
30
- class Item < ActiveRecord::Base
31
- has_record_history :on => [:update]
32
- end
33
-
34
- # get history for object
35
- item = Item.first
36
- history = item.first.record_history
37
- history.first.old_value
38
- hostory.first.new_value
39
-
40
-
41
- # declare that User is author for some record_history items
42
- class User < ActiveRecord::Base
43
- is_record_history_author
44
- end
45
-
46
- # get record_history items created by user
47
- User.first.written_history
48
-
14
+ # activate history logging for model
15
+ class Item < ActiveRecord::Base
16
+ has_record_history
17
+ end
18
+
19
+ # activate history logging for model (only for "name" field)
20
+ class Item < ActiveRecord::Base
21
+ has_record_history :only => [:name]
22
+ end
23
+
24
+ # activate history logging for model (except 'name' field)
25
+ class Item < ActiveRecord::Base
26
+ has_record_history :ignore => [:name]
27
+ end
28
+
29
+ # activate history logging for model (on update)
30
+ class Item < ActiveRecord::Base
31
+ has_record_history :on => [:update]
32
+ end
33
+
34
+ # get history for object
35
+ item = Item.first
36
+ history = item.first.record_history
37
+ history.first.old_value
38
+ hostory.first.new_value
39
+
40
+
41
+ # declare that User is author for some record_history items
42
+ class User < ActiveRecord::Base
43
+ is_record_history_author
44
+ end
45
+
46
+ # get record_history items created by user
47
+ User.first.written_history
48
+
49
49
 
@@ -1,3 +1,3 @@
1
1
  module RecordHistory
2
- VERSION = "0.8.4"
2
+ VERSION = "0.8.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: record_history
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: