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?