Sha256: 9d91d27f1b9afa5732b4ad9cd2b7d11c01da9d38e34c6e0a52715d2b48c27ac1
Contents?: true
Size: 1.05 KB
Versions: 6
Compression:
Stored size: 1.05 KB
Contents
# record_history ActiveRecord history ## Installation ``` gem install record_history rails g record_history:install ``` ## Usage # activate history logging for model class Item < ActiveRecord::Base has_record_history end # activate history logging for model (only for "name" field) class Item < ActiveRecord::Base has_record_history :only => [:name] end # activate history logging for model (except 'name' field) class Item < ActiveRecord::Base has_record_history :ignore => [:name] end # activate history logging for model (on update) class Item < ActiveRecord::Base has_record_history :on => [:update] end # get history for object item = Item.first history = item.first.record_history history.first.old_value hostory.first.new_value # declare that User is author for some record_history items class User < ActiveRecord::Base is_record_history_author end # get record_history items created by user User.first.written_history
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
record_history-0.9.0 | README.md |
record_history-0.8.9 | README.md |
record_history-0.8.8 | README.md |
record_history-0.8.7 | README.md |
record_history-0.8.6 | README.md |
record_history-0.8.5 | README.md |