Topic: Rails ERD - uninitialized constant - Wrong model ?

Hello i have some errors in generating ERD from models.. I guess i have wrong associations.. pls look at it

[DB]

orders
------
payment_address_id
delivery_address_id
user_id

products_orders
---------------
product_id
order_id


[MODELS]

Order
-----
has_many :products_orders
has_many :products, :through => :products_orders
belongs_to :address, :foreign_key => :payment_address_id
belongs_to :address, :foreign_key => :delivery_address_id
belongs_to :user

products_orders
---------------
belongs_to :product
belongs_to :order

[rake erd]
Warning: Ignoring invalid association :products_orders on Order (uninitialized constant Order::ProductsOrder)
Warning: Ignoring invalid association :products on Order (uninitialized constant Order::ProductsOrder)
Warning: Ignoring invalid association :user on Order (uninitialized constant Order::User)
Warning: Ignoring invalid association :products_orders on Product (uninitialized constant Product::ProductsOrder)
Warning: Ignoring invalid association :orders on Product (uninitialized constant Product::ProductsOrder)

what have i wrong ? Thank you

Re: Rails ERD - uninitialized constant - Wrong model ?

set_table_name "products_orders"
is a solution