Commit Graph

31 Commits

Author SHA1 Message Date
conickal 3954767072 Add generator compatible with Rails 3. 2010-10-11 17:51:10 +01:00
Andy Stewart c71ef98895 Remove comment. See issue 17. 2010-09-03 10:08:08 +01:00
Andy Stewart f27763bf57 Clarify who was responsible for changes.
N.B. This commit adds an `originator` method to the Active::Record
mixin so be careful if your AR object already has a method of the same
name.
2010-06-28 14:03:35 +01:00
Andy Stewart 424724d678 Simplify code. 2010-06-28 11:27:08 +01:00
Andy Stewart b43400e33b Navigate to an item's previous and next version. 2010-06-22 14:42:57 +01:00
Andy Stewart cc794c1002 Whitespace. 2010-06-22 14:42:57 +01:00
Andy Stewart cc835027fa Navigate back to reified item's version. 2010-06-22 14:42:53 +01:00
Andy Stewart 15559af8b2 Explicitly require singleton.
Seems to be needed for Rails 3 beta 3.
2010-04-27 17:25:08 +01:00
Andy Stewart 5405806b95 Add comments to explain InstanceMethods. 2010-04-06 17:27:15 +01:00
Andy Stewart 3036aa75b5 Store controller info. Allow other current_user methods.
PaperTrail can now store any information from the controller or request.
It's also easy to choose a method other than `current_user` for
PaperTrail to call to find out who was responsible for changes.
2010-03-19 18:53:49 +00:00
Andy Stewart e68c2f965f Refactor to separate concerns (model, controller). 2010-03-19 17:21:16 +00:00
Andy Stewart 4f4f814500 Global enable/disable for PaperTrail.
Thanks to these commits from jeremyw:

* 9254147
* 3748fd3..66463e6
2010-03-19 15:21:07 +00:00
Andy Stewart 9332ff25c2 Make PaperTrail threadsafe. 2010-03-19 14:19:01 +00:00
Andy Stewart 4e1f3c8845 Added comments. 2010-02-18 16:35:41 +00:00
Andy Stewart aadb158d13 Add tests for version_at instance method (and fix logic).
Manually extracted from commit 6ee25ef92593e87f87d1a29af74c6e3aaa92b566.
2010-02-18 16:22:26 +00:00
Jeremy Weiskotten 1aa0284bbe Added version_at instance method to model. 2010-02-18 15:46:30 +00:00
Andy Stewart 55185cd448 Store user-defined metadata. 2010-01-06 12:57:54 +00:00
Zachery Hostens 6878fc5a0e fix up code and tests to succeed 2009-11-19 21:15:30 -06:00
Andy Stewart 52981bfca3 Optionally ignore attributes. 2009-10-28 13:12:36 +00:00
Andy Stewart ef09502001 Try to call current_user regardless of its visibility. 2009-07-24 08:19:16 +01:00
Andy Stewart 946a612d4e Added index method to Version. 2009-06-22 16:37:00 +01:00
Andy Stewart c6441656d4 Previous and next methods for Version. 2009-06-19 16:46:33 +01:00
Andy Stewart c2e80fba9e Adjusted whitespace for legibility. 2009-06-19 10:15:49 +01:00
Andy Stewart 350edcf4c0 Use the item we belong to where possible.
This has two benefits:
* Associations work since we are using the real object.
* The code is simpler and more intuitive.
2009-06-18 18:21:20 +01:00
Andy Stewart 2958a816a9 Copy only the versions has_many association. 2009-06-18 11:38:32 +01:00
Andy Stewart 376a493a24 Copy has_many associations when reifying. 2009-06-18 11:10:54 +01:00
Andy Stewart 86f89faf3b Don't save an object when associating it to reified model. 2009-06-18 10:30:33 +01:00
Andy Stewart a4300d4d98 Preserve has_one associations when reifying a version. 2009-06-18 09:45:46 +01:00
Andy Stewart b6bd59fd3d Handle single table inheritance when reifying. 2009-06-17 12:36:23 +01:00
Andy Stewart f1e29eabcd Let Jeweler manage version. 2009-05-27 16:42:45 +01:00
Andy Stewart e9a8648c22 First commit. 2009-05-27 16:21:20 +01:00