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??
on 2007-05-23 20:34
on 2007-05-23 20:40
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