Reputation: 22949
I have an application that translates some model data and I would like to version this data. So this is my setup:
I have created a pull-request that should add rails 5 functionality to the globalize-versioning gem.
I already did this:
.travis.yml
so that tests are run.Now all tests in the projects fail and I can't quite figure out how to add the paper_trail functionality to the translations objects from globalize.
Upvotes: 1
Views: 247
Reputation: 1642
You changed the alias_method_chain
wrongly.
alias_method :versioning, :setup_translates!
alias_method :setup_translates!, :versioning
This only aliases versioning and setup_translates!. What alias_method_chain
actually tries is to make sure a overriden method is still callable.
So this:
alias_method_chain :setup_translates!, :versioning
should be changed to:
alias_method :setup_translates_without_versioning!, :setup_translates!
alias_method :setup_translates!, :setup_translates_with_versioning!
Try if this solves the issues.
source: alias_method_chain
Upvotes: 2