NoMethodError with :has_many

Hi,
I have a problem in the guts of Rails. I have a :has_many association.
The :has_many method calls the method
“add_multiple_associated_save_callbacks” and this is where I have
problems. In the line “validate method_name” my application crashes with
a NoMethodError. What is the “validate” method? From which module does
it come?
Best regards
Bernd

Moises D. wrote:

I have a problem in the guts of Rails. I have a :has_many association.
The :has_many method calls the method
“add_multiple_associated_save_callbacks” and this is where I have
problems. In the line “validate method_name” my application crashes with
a NoMethodError. What is the “validate” method? From which module does
it come?

Can you post the code?

The problem is that I have a class that inherits already from another
class and anyway I want to use some functions of some modules of the
ActiveRecord package in that class, e.g. from ActiveRecord::Associations
and
ActiveRecord::Associations::ClassMethods. So I call has_many :things and
then it crashes in line 979 of the file associations.rb of the
ActiveRecord library. The line has the content “validate method_name”.

Cheers
Bernd

I have a problem in the guts of Rails. I have a :has_many association.
The :has_many method calls the method
“add_multiple_associated_save_callbacks” and this is where I have
problems. In the line “validate method_name” my application crashes with
a NoMethodError. What is the “validate” method? From which module does
it come?

Can you post the code?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs