I have a plugin which does something like this for different associations: belongs_to_klass.send(:belongs_to, belongs_to_name) This works fine for the first page request in mongrel/webrick, but the associations are lost on/by the next page request. Any ideas? Thanks :o) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Matthew Painter wrote:> I have a plugin which does something like this for different > associations: > > belongs_to_klass.send(:belongs_to, belongs_to_name) > > This works fine for the first page request in mongrel/webrick, but the > associations are lost on/by the next page request. Any ideas? > > Thanks :o)Heh, thought of the answer just after posting! In environment.rb, this was the case: config.cache_classes = false So the classes were being scrubbed, but the plugin was not being called again. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On 2006-09-20, at 13:18 , Matthew Painter wrote:> > I have a plugin which does something like this for different > associations: > > belongs_to_klass.send(:belongs_to, belongs_to_name) > > This works fine for the first page request in mongrel/webrick, but the > associations are lost on/by the next page request. Any ideas?Test with the production environment. If it works there, then it''s a problem with class reloading that happens in the development environment. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---