<commit_before>= ar-audit-tracer

== Summary

'ar-audit-tracer' patches ActiveRecord so modifiers can be traked on saving(insert/update) a model same.
You can track 'modifiers' the same ways you can track modification timestamps by adding columns 'created_by' and 'updated_by'.

== Usage

=== Migration
In migrations add
    t.authors
This will add columns 'created_by' and 'updated_by' of type :string to a table

IF you want to use another type simply pass the type as argument, e.g.
    t.authors(:integer)

=== Usage


  

== Note on Patches/Pull Requests
 
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
  future version unintentionally.
* Commit, do not mess with rakefile, version, or history.
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

== Copyright

Copyright (c) 2010 <NAME>. See LICENSE for details.<commit_msg>Fixed Readme.<commit_after>= ar-audit-tracer


== Summary

<i>ar-audit-tracer</i> patches ActiveRecord so modifiers of a record can be traked on saving (insert/update).
It works exactly like 'timestamps' (see usage below).


== Usage

=== Migration

In a models migration add:
  t.authors
  
This will add columns +created_by+ and +updated_by+ of type +:string+ to your model.

In case you want to use another type, simply pass the type as argument, e.g.
  t.authors(:integer)

=== Usage

All you need to do is to set the current author such as e.g:
  Concern::Audit::Author.current="bad_man"

Each ActiveRecord +save+ or +update+ then will set the respetive attributes +created_by+ and +modified_by+ automatically, whereas the modifier is set to the same value as the creator on model creation.

In a Rails Application you would set the author as described above in a +before_filter+.
+Concern::Audit::Author+ stores the author in a Thread-Local variable.

== Additional Notes
In case you need associations to a respective Author Model you have to set them up yourselfs.

{'fraction_non_alphanumeric': 0.0754985754985755, 'fraction_numerical': 0.001899335232668566, 'mean_word_length': 4.114077669902913, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3973530', 'n_tokens_mistral': 625, 'n_tokens_neox': 598, 'n_words': 303}