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

34 commits

Author SHA1 Message Date
Ben Atkins
09a45080d2 Fix test suite crashes stemming from 9542529 on Travis 2015-01-20 16:07:33 -05:00
Ben Atkins
9542529e79 close #465; versions_associations association should not be initialized on the VersionConcern unless the table was created 2015-01-20 15:25:06 -05:00
Ben Atkins
cd9233ba0b Fix excess indentations [ci skip] 2015-01-14 13:10:13 -05:00
Ben Atkins
4a92ed7ea5 close #420; Add VersionConcern#where_object_changes 2015-01-07 16:57:45 -05:00
Ben Atkins
6f17e23b5f 'object_changes' is an optional column for the versions table 2014-12-31 13:32:43 -05:00
Ben Atkins
b30b2e86d5 Add config option for enabling/disabling utilization of serialized_attributes,
useful for ActiveRecord 4.2+ where the feature is deprecated.
2014-12-29 14:38:32 -05:00
Ben Li
e78b1e9a80 Documentation for reifying associations 2014-12-17 15:47:18 +11:00
Ben Li
765858fb00 fix reify(:has_one => true) data persisting issue and add more test for data persisting 2014-12-11 14:13:24 +11:00
Ben Li
1aad2f4317 avoid unnecessary VersionAssociation reords and db queries for reification 2014-12-04 23:32:28 +11:00
Ben Li
5903354fbe remove code that are not necessary 2014-12-04 23:04:37 +11:00
Ben Li
a2b96afa8e fix for a has-many :through scenario 2014-11-10 13:06:29 +11:00
Ben Li
0f89d37623 fix a bug when has_many :through does not have paper_trail enabled 2014-11-04 15:52:31 +11:00
Ben Li
09c2cfdace fix for ruby 1.8.7 and a bug 2014-11-04 12:20:37 +11:00
Ben Li
44972bea3d fix code not working in active_support 3.x 2014-11-03 16:38:48 +11:00
Ben Li
113cf5d17f Merge branch 'master' of github.com:airblade/paper_trail into merge-with-lyfeyaj 2014-11-03 14:19:34 +11:00
Ben Li
0e6b1119ae reify has_many through; add option mark_for_destruction; disable recursive reification of has_many; add tests 2014-11-03 14:05:00 +11:00
Ben Atkins
08d89bdd5a close #391; Model::InstanceMethods#changes_for_paper_trail should return a plain Hash instead of an ActiveSupport::HashWithIndifferentAccess
This will cut down on the length of the Strings being stored in the 'object_changes'
column on the 'versions' table in the database.
2014-10-21 15:05:16 -04:00
NullVoxPopuli
fa69a9b8ce update tests. currently 10 failing due to transaction id field missing 2014-10-20 14:15:18 -04:00
NullVoxPopuli
ce2cf0d234 Merge branch 'master' of https://github.com/lyfeyaj/paper_trail into merge-with-lyfeyaj
Conflicts:
	lib/paper_trail.rb
	lib/paper_trail/has_paper_trail.rb
	lib/paper_trail/version_concern.rb
2014-10-20 13:04:51 -04:00
Vinh Bachsy
091b78e1d0 Fix reify method
Handle case old version has attribute with same name with current model setter
2014-09-29 14:24:46 +07:00
Ben Atkins
6de04f199e Merge remote-tracking branch 'straydogstudio/master' 2014-07-29 11:49:28 -04:00
Ben Atkins
6421f1fae7 Update CHANGELOG and cleanup changes from PR #399 2014-07-25 15:49:39 -04:00
Mourad Hammiche
1cc1d7a1cc Version#reify return new object instance with dup: true options 2014-07-18 11:01:13 +02:00
Ben Atkins
e8f88b40c8 Fix PaperTrail::Version#where_object so it works on Ruby19 and Ruby18 2014-06-26 16:11:22 -04:00
Jacob Evelyn
703ec9ae88 Add where_object query to PaperTrail::Version. 2014-06-07 14:11:50 -04:00
Noel Peden
5ee45827c2 Have Version created_at match model 2014-06-03 07:53:47 -07:00
Ben Atkins
4601926f0c close #372; Use Arel for SQL construction on VersionConcern for cleanliness; fix VersionConcern#index so it also sorts by primary key when possible 2014-05-28 19:18:53 -04:00
Ben Atkins
8ae62c8b8e Fix test suite for ActiveRecord 3.x; assume primary key is INT if 'versions' table doesn't exist yet 2014-05-09 11:51:05 -04:00
Ben Atkins
0b05a58763 :versions association should default to sorting by the VersionConcern#timestamp_order method to match the scope methods 2014-05-09 11:01:33 -04:00
Ben Atkins
1a13748ab1 Attempt to sort based on primary key in scope methods on VersionConcern if primary key is an integer.
This makes some of the changes to these scope methods that came from 6a4aba2 more flexible,
in that the user can choose to compare timestamps if desired, but it defaults to comparing and sorting,
via the primary key (if it is an integer).  If the primary key is not an integer, it still defaults
to using the PaperTrail.timestamp_field.

This is my proposed fix for #314, and I also believe it should fix #317. It seems that that this issue
is usually encountered when testing PaperTrail with MySQL (presumably due to lack of microsecond timestamp support).
2014-04-30 18:13:04 -04:00
lyfeyaj
546c58b975 fix bugs 2014-02-26 19:44:43 +08:00
lyfeyaj
e69d68cab9 fix bugs and change alias to alias_method 2014-02-26 09:24:51 +08:00
lyfeyaj
78292e0fb0 add has many associations functionality 2014-02-25 22:02:36 +08:00
Ben Atkins
09215604d0 Move VersionConcern module into it's own file 2013-12-03 16:00:04 -05:00