I have the following model layout:
class List < ActiveRecord::Base
has_many :subscribers, :through => :list_subscribers
has_many :list_subscribers
end
class Subscriber < ActiveRecord::Base
has_many :lists
has_many :lists, :through => :list_subscribers
end
class ListSubscriber< ActiveRecord::Base
belongs_to :list
belongs_to :subscriber
validates_uniqueness_of :subscriber_id, :scope => :list_id
end
and get the following error:
railroad -i -l -a -m -M | dot -Tpng | sed
''s/font-size:14.00/font-size:12.00/g'' > doc/models.png
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/whiny_nil.rb:52:in
`method_missing'': undefined method `klass'' for nil:NilClass
(NoMethodError)
from
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/reflection.rb:320:in
`source_reflection''
from
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/reflection.rb:320:in
`collect''
from
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/reflection.rb:320:in
`source_reflection''
from
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/reflection.rb:381:in
`derive_class_name''
from
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/reflection.rb:112:in
`class_name''
from
/home/kaitest/.gem/ruby/1.8/gems/dmattes-railroad_xing-0.5.4/lib/railroad/ar_model.rb:85:in
`process_association''
from
/home/kaitest/.gem/ruby/1.8/gems/dmattes-railroad_xing-0.5.4/lib/railroad/ar_model.rb:65:in
`edges''
from
/home/kaitest/.gem/ruby/1.8/gems/dmattes-railroad_xing-0.5.4/lib/railroad/ar_model.rb:64:in
`each''
from
/home/kaitest/.gem/ruby/1.8/gems/dmattes-railroad_xing-0.5.4/lib/railroad/ar_model.rb:64:in
`edges''
from
/home/kaitest/.gem/ruby/1.8/gems/dmattes-railroad_xing-0.5.4/lib/railroad/models_diagram.rb:69:in
`process_class''
from
/home/kaitest/.gem/ruby/1.8/gems/dmattes-railroad_xing-0.5.4/lib/railroad/models_diagram.rb:29:in
`generate''
from
/home/kaitest/.gem/ruby/1.8/gems/dmattes-railroad_xing-0.5.4/lib/railroad/models_diagram.rb:28:in
`each''
from
/home/kaitest/.gem/ruby/1.8/gems/dmattes-railroad_xing-0.5.4/lib/railroad/models_diagram.rb:28:in
`generate''
from
/home/kaitest/.gem/ruby/1.8/gems/dmattes-railroad_xing-0.5.4/bin/railroad:47
from /home/kaitest/.gem/ruby/1.8/bin/railroad:19:in `load''
from /home/kaitest/.gem/ruby/1.8/bin/railroad:19
Any help much appreciated.
--
Posted via http://www.ruby-forum.com/.
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.