The error tells you what the problem is. There is no class CustomerBill :: CustomerBillLineItem that can be found.
1: I assume that you are not instantiating customer_bill_line_item in action_bills # new, otherwise you will see the same error.
Please confirm by checking that you are creating instances of customer_bill_line_item on @customer_bill in a new action with something like
3.times{@customer_bill.customer_bill_line_items.build}
If you get the same error again, but on the controller assembly line, confirm that it says an error that it cannot find the CustomerBillLineItem class through CustomerBill
I suspect a typo in the file name of the CustomerBillLineItem class. Make sure that your class is located in a file named customer_bill_line_item.rb and is located in your models folder and is not in any other folder. Perhaps the problem is here too.
The bottom line of CustomerBillLineItem is not indicated or correctly placed, and that is why you get this error, which tells you that it cannot find the specified class.
source share