Railroad problem with :through?

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 methodklass’ 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:incollect’
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:inderive_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:inprocess_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:ineach’
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:inprocess_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:ineach’
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:inload’
from /home/kaitest/.gem/ruby/1.8/bin/railroad:19

Any help much appreciated.

Sem P. wrote:

Is this a typo, or your problem source?

class Subscriber < ActiveRecord::Base
has_many :lists
has_many :lists, :through => :list_subscribers
end

class Subscriber < ActiveRecord::Base
has_many :list_subscribers
has_many :lists, :through => :list_subscribers
end

Ar Chron wrote:

Sem P. wrote:

Is this a typo, or your problem source?

class Subscriber < ActiveRecord::Base
has_many :lists
has_many :lists, :through => :list_subscribers
end

class Subscriber < ActiveRecord::Base
has_many :list_subscribers
has_many :lists, :through => :list_subscribers
end

My problem source.

Thank you.