I beg your pardon for this surely stupid problem, but I’m new in RoR
world.
I created 3 views inheriting ActiveRecord::Base , lets call them a,b,c.
a and b are linked by a table (a_b_fk) and the corresponding foreign
keys.
Now, when I generate the “administration” page by simply calling
scaffold_all_models (from Scaffolding Extensions Plugin) everything
works fine, but if I had has_and_belongs_to_many :a in b and
symmetrically in a, I get an error :
I beg your pardon for this surely stupid problem, but I’m new in RoR
world.
I created 3 views inheriting ActiveRecord::Base , lets call them a,b,c.
a and b are linked by a table (a_b_fk) and the corresponding foreign
keys.
Now, when I generate the “administration” page by simply calling
scaffold_all_models (from Scaffolding Extensions Plugin) everything
works fine, but if I had has_and_belongs_to_many :a in b and
symmetrically in a, I get an error :
Most likely the reflection doesn’t exist or it isn’t
:has_and_belongs_to_many. See line 1099 of scaffolding_extensions.rb.
If I had to guess, you are using:
class B
has_and_belongs_to_many :a
end
instead of:
class B
has_and_belongs_to_many :as
end
But I wouldn’t know for sure until you paste your model code.
Jeremy
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.