ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

acts_as_journalized generates model classes that aren't unloadable (Bug #1198)


Added by Greg Thornton at 2013-01-06 11:54 pm. Updated at 2013-01-20 01:02 pm.


Status:Duplicate Start date:2013-01-06
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Journals / History
Target version:-
Remote issue URL: Affected version:master

Description

When aaj creates a journal class for a model, it doesn't send unloadable, but the parent Journal class does. When running in development (config.cache_classes = false) the journal subclass doesn't reload with the parent, so it loses the overridden <=> method and picks up the implementation in Comparable. That in turn screws up the check in one of the save hooks and an exception is raised a little further down the line.

I have no idea why it seems to work as-is for core journaled models. I also don't know how to test it, because the test env (and script/console) don't seem to reload the classes in the same way.

To replicate, create a plugin with a journalized model and a controller action that saves an instance of that model. The reset_instance_variables save hook will raise an exception.


Associated revisions

Revision fbafff83
Added by Jean-Philippe Lang at 2008-05-25 02:18 pm

Hungarian translation added (#1198 by Gábor Takács).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1452 e93f8b46-1217-0410-a6f0-8f06a7374b81

History

Updated by Greg Thornton at 2013-01-20 01:02 pm

see #1199

  • Status changed from Open to Duplicate

Also available in: Atom PDF