bramski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-May-23 18:33 UTC
Development Mode: Class reloading gone nuts!
This is mostly that I''ve gone a bit crazy, but I''m looking for an explanation of how class reloading works so I can try and debug this issue.... I have a class... class Event before_create :bootstrap_current_user def bootstrap_current_user ... saves the current user for this event... end end class FriendRequestEvent < Event end So, in development mode, when I hit my controller, it culminates in a: FriendRequestEvent.create() but, I''m getting an exception in development mode only... NoMethodError: boostrap_current_user for <#FriendRequestEvent> for what possible reason could this occur? I''m thinking maybe it''s got the wrong parent class? Or somewhere else there''s an Event class being reloaded, but without the method?? --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
hi,> class Event > before_create :bootstrap_current_user > def bootstrap_current_user > ... saves the current user for this event... > end > but, I''m getting an exception in development mode only... > NoMethodError: boostrap_current_user for <#FriendRequestEvent> >I''m assuming you copy/pasted the code and error messages here. If so, then your problem is your application seems to be looking for a misspelled method BOOstrap_current_user, without the T. Just find for that word in your code and you''ll probably fix it. regards, javier ramirez --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---