Undefined method 'make_activation_code' Rails error using Restful_Authentication?

I couldn't speak to how to solve this problem directly, but in situations where anomalous behavior is at hand, my approach is usually to try to isolate what's causing the problem. In your case, I'd try things like creating a method of a different name than "make_activation_code," see if you can add it to before_create and it gets called. If so, add the code that's currently in make_activation_code inside the method and see if it still works.

I couldn't speak to how to solve this problem directly, but in situations where anomalous behavior is at hand, my approach is usually to try to isolate what's causing the problem. In your case, I'd try things like creating a method of a different name than "make_activation_code," see if you can add it to before_create and it gets called. If so, add the code that's currently in make_activation_code inside the method and see if it still works.

The closest phenomenon I have seen to this specific problem is with the Savage Beast plugin, where the plugin itself has a User model which can redefine the User model inside the application. That's why it would be interesting to see if you can add a different method to your before_create and see if it gets called, so you can verify that your User model itself isn't somehow being replaced by a rogue User model defined in some other part of your app. Another way to test this theory would be to see if it works differently in production than in development mode.In production, the model doesn't get reloaded between requests, so there is less likely to be problems with one model/method in a plugin overriding another after the initial environment load.

Ok I found the answer to my question. I had to change around the before_create to look like this: def before_create self. Activation_code = self.class.

Make_token end def make_password_reset_code self. Reset_password_code = Digest::SHA1. Hexdigest( Time.now.

To_s. Split(//). Sort_by {rand}.

Join ) end Must have been an internal change in Rails.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions