ActiveRecord::Acts::Versioned::ActMethods#next_version Generates ArgumentError
There's a patch already available here. I'm not sure why the WikiContent model doesn't break, but it does customize the WikiContent::Version class's behavior slightly.
Updated by Justin Leishman over 9 years ago
self.locking_column = 'version' gets around this problem, but I don't see it documented anywhere.
Updated by Mischa The Evil over 9 years ago
This is also discussed in. What is missing is a clear way how to reproduce the error.
Justin Leishman wrote:
self.locking_column = 'version'gets around this problem, but I don't see it documented anywhere.
self.locking_column = 'version' is 'available' in source:/trunk/app/models/wiki_content.rb#L21. I don't see how that is related.
Updated by Leandro Guida over 9 years ago
Ok. The patch fixed my problem.
Updated by Jean-Philippe Lang over 9 years ago
- Category set to Code cleanup/refactoring
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- Target version set to 2.4.0
- Resolution set to Fixed
I was not able to trigger this error from within Redmine but I WikiContent#next_version actually raises this error.
Fix applied in r12222.