How does Active Record determine what tables to use when you define an
association? For example
class Order < ActiveRecord::Base
has_many :orderItems
end
class OrderItem < ActiveRecord::Base
belongs_to :order
end
Then in a view you use the association name:
@order[0].orderItems.each {|line| puts line.item_id + " - " +
line.name}
It turns out that you can also use the names “order_items” or
“Order_Items” instead of “orderItems” and that works fine. I would
expect one or the other to work but not both.
Is ambiguity this by design?
Which should be used according to best practice?
Rick