Thank you very much for that explanation.

On Oct 5, 1:57 pm, Frederick Cheung <[email protected]>
wrote:
> On Oct 5, 11:33 am, Eduardo Yáñez Parareda <[email protected]>
> wrote:> Using RAILS_GEM_VERSION = '2.1.2'
>
> > Hello, I'm developing a plugin for another rails app. When I try to
> > show the new form view I got this error:
>
> >  ActiveRecord::AssociationTypeMismatch in Audit testsController#new
>
> > Project(#70348727429120) expected, got Project(#70348730882020)
>
> The root cause of your problem is that in development mode  plugins
> are not reloaded between requests (at least that's the default) but
> your application classes are, so if your plugin model class holds a
> reference to one of your model classes then from the second request
> that reference now points at an old version of the class (which isn't
> equal to the fresh one, hence the slightly confusing message).
> One way around this is to have your plugin be reloaded on each request
> too, among other ways this can be done by removing it from
> ActiveSupport::Dependencies.load_once_paths (which was just
> Dependencies.load_once_paths in a previous version of rails - don't
> remember when the switch happened(
>
> Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to