While trying to run Basket.fruits(true) (or access Basket.fruits at all) I
get:
ArgumentError:
./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:399:in
`to_constant_name'': Anonymous modules have no name to be referenced by
from
./script/../config/../config/../vendor/rails/activerecord/lib/active_record/base.rb:1359:in
`compute_type''
from
./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:211:in
`qualified_name_for''
from
./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:471:in
`const_missing''
from (eval):1:in `compute_type''
from
./script/../config/../config/../vendor/rails/activerecord/lib/active_record/reflection.rb:112:in
`klass''
from
./script/../config/../config/../vendor/rails/activerecord/lib/active_record/reflection.rb:163:in
`source_reflection''
from
./script/../config/../config/../vendor/rails/activerecord/lib/active_record/reflection.rb:163:in
`source_reflection''
from
./script/../config/../config/../vendor/rails/activerecord/lib/active_record/reflection.rb:172:in
`check_validity!''
from
./script/../config/../config/../vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb:6:in
`initialize''
from
./script/../config/../config/../vendor/rails/activerecord/lib/active_record/associations.rb:920:in
`niches''
from (irb):25
I am 100% sure my code is correct, I''ve compared it against the
tutorial
found here:
http://wiki.rubyonrails.org/rails/pages/Beginner+Howto+on+has_many+%3Athrough
Anyone run into this error before?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
On Dec 16, 11:01 pm, kris <clo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am 100% sure my code is correct, I''ve compared it against the tutorial > found here:http://wiki.rubyonrails.org/rails/pages/Beginner+Howto+on+has_many+%3... >Kris, It would be easier to understand what''s going on if you posted the relevant parts of you models. Aaron --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Aaron, Problem solved. I t was actually because the name I used for the model, the model was labeled "Niches". "niche".pluralize returns niches, but "niches".singularize returns "nich". Problem solved though. Thanks for the reply :) On 12/16/06, Aaron <baldwina-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Dec 16, 11:01 pm, kris <clo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I am 100% sure my code is correct, I''ve compared it against the tutorial > > found here: > http://wiki.rubyonrails.org/rails/pages/Beginner+Howto+on+has_many+%3... > > > > Kris, > > It would be easier to understand what''s going on if you posted the > relevant parts of you models. > > Aaron > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---