Commit Graph

6 Commits

Author SHA1 Message Date
Rumble Huang e255e71756 No need to calculate previous values of skipped attributes 2019-02-04 13:31:17 -05:00
Jared Beck 84368ea289 Extract `Events` module
Introduces event classes, like Events::Create, which wrap the
AR instance and have one public method, `#data`, which returns
the attributes of nascent `Version` records. See comments in
Events::Base.

This extraction greatly simplifies RecordTrail. Not only have
we moved a lot of code out of RecordTrail, but we've also
moved the `@in_after_callback` variable. In its new location, this
variable is much easier to understand, and we no longer need the
`ensure` blocks to reset it.

Preserving compatibility with PT-AT caused some minor difficulties,
and we should follow up with them to see if we can simplify the
API they are using. Specifically, we would like to delete the
`data_for_*` methods.
2018-07-22 01:32:30 -04:00
Jared Beck 00367625a4 Alternative solution to #1084 2018-05-14 12:26:32 -04:00
Jared Beck cfbf7a647c Lint: Style/FrozenStringLiteralComment 2017-12-10 23:05:39 -05:00
Jared Beck 38fa23873c Merge rails_helper into spec_helper
The reason some projects have both is so that some spec files can be
run in isolation, without the rails stuff. In practice, I don't find
myself ever doing this. So, the complexity of two files is unnecessary.
2017-05-30 00:59:55 -04:00
Jared Beck 8dae6f66b2 Convert test/unit/serializer_test to rspec 2017-05-30 00:52:03 -04:00