[Rails] Rails ERD - Help with model
Hello i have some errors in generating ERD from models.. I guess i have
wrong associations.. please 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
--
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/084737f3cc781cba45ee0f2c1705580d%40ruby-forum.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home