Permalink
Browse files

Merge branch 'master' of github.com:Sigiz/record_history

  • Loading branch information...
2 parents 2bdf6f0 + 23b93fa commit 86d904574b6727bb567cdc1dde99c96e156ad279 Mikhail Gulin committed Feb 29, 2012
Showing with 35 additions and 35 deletions.
  1. +35 −35 README.md
View
@@ -11,39 +11,39 @@ 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
-
+ # 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
+

0 comments on commit 86d9045

Please sign in to comment.