1
0
Fork 0
mirror of https://github.com/paper-trail-gem/paper_trail.git synced 2022-11-09 11:33:19 -05:00
Commit graph

20 commits

Author SHA1 Message Date
Emmanuel Gomez
a23144fc04 One more Version scope for PaperTrail::Model. 2011-02-05 23:44:56 -08:00
Emmanuel Gomez
9fc312c129 Refactor Version to use some named scopes. 2011-02-05 23:44:25 -08:00
Andy Stewart
fce1c908ef Use :write_attribute everywhere. Add tests. 2010-10-28 10:15:15 +01:00
Andy Stewart
a219759dfe Send a symbol to send (personal preference). 2010-10-28 09:51:23 +01:00
Thibaud Guillaume-Gentil
e94e25b614 Used write_attribute rather than attribute writer when reify (make CarrierWave working with papertrail) 2010-10-26 15:26:34 +02:00
Andy Stewart
100eb53c9e Improve automatic reification of has_one associations.
This still isn't optimal but it should be good enough most of the time.
You can tweak it or turn it off if you like.
2010-10-21 14:04:28 +01:00
Andy Stewart
9728e3158e Automatically restore has_one associations. 2010-10-20 13:48:52 +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
cc835027fa Navigate back to reified item's version. 2010-06-22 14:42:53 +01:00
Zachery Hostens
6878fc5a0e fix up code and tests to succeed 2009-11-19 21:15:30 -06: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
e9a8648c22 First commit. 2009-05-27 16:21:20 +01:00