Extension to handle changes in data models
Last updated on: December 29 at 07:54 PM
source code bug trackerAllows audit of customer orders shown at the time of purchase, keeping with historical changes in:
Finally have a section in the backend, from where you can see the change history of an order.
Note: Remember that the history in the order is not enabled by default, you must enable this according to your needs.
Add spree_papertrail to your Gemfile:
gem 'spree_papertrail'
Bundle your dependencies and run the installation generator:
bundle
bundle exec rails g spree_papertrail:install
To track product changes you need to add the following line to your order_decorator:
after_save :make_version
Or, to track on specific transition:
state_machine.before_transition from: :address, do: :make_version
First bundle your dependencies, then run rake
. rake
will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app
.
bundle
bundle exec rake
When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:
require 'spree_papertrail/factories'
Copyright (c) 2014 Acid Labs, released under the New BSD License
tags | spree versions |
---|---|
master | ~> 2.3.3 |