Andy Stewart
f65cd0f722
Add info and tests for has_many :through.
2010-07-05 13:01:02 +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
b43400e33b
Navigate to an item's previous and next version.
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
5d1f1fb618
Fix typo.
2010-06-22 12:29:07 +01:00
Andy Stewart
fb97ea8a25
Fix data type.
2010-04-27 16:39:27 +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
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
a981969e9a
Remove obsolete code. Whitespace.
2010-03-19 14:37:19 +00:00
Jeremy Weiskotten
775514602c
Fixed tests that compare timestamps. Using to_time.utc instead of strftime because %z option is incorrectly printing EST offset instead of UTC offset.
2010-03-19 10:32:32 -04:00
Andy Stewart
9332ff25c2
Make PaperTrail threadsafe.
2010-03-19 14:19:01 +00:00
Phan Le
aac0f945c9
Added a test for Thread safety
2010-03-18 18:29:02 +00:00
Andy Stewart
9daa2abcb7
Move test routes to somewhere more sensible.
2010-03-18 18:18:56 +00:00
Andy Stewart
e0f6c46f14
Remove obsolete code.
2010-03-18 18:18:17 +00:00
Andy Stewart
b88af80916
Clean up test helper.
2010-03-18 18:09:48 +00:00
Andy Stewart
a22368aa77
Tests for version_at easier (for me) to understand.
2010-02-18 17:10:10 +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
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
Zachery Hostens
dc5e6fd970
fix controller test to properly execute
2009-11-19 20:56:25 -06:00
Zachery Hostens
ba0982e9de
update test code to work without being in a rails app
2009-11-19 20:51:25 -06:00
Zachery Hostens
57ca3aaa28
clean up database.yml file to be more proper
2009-11-19 20:51:03 -06:00
Andy Stewart
52981bfca3
Optionally ignore attributes.
2009-10-28 13:12:36 +00:00
Andy Stewart
3bf29c2930
Index the polymorphic join.
2009-06-22 18:35:03 +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
9006313496
Added tests for recovering a destroyed object.
2009-06-19 10:14:04 +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
8441414cb1
Removed unused model.
2009-06-17 12:16:16 +01:00
Andy Stewart
e9a8648c22
First commit.
2009-05-27 16:21:20 +01:00