I have two models, A and B where B blongs_to A and A has_many B.
I have a view that does "new" on B and then I call a create method on
B which then makes the call @B.create_A(params[:wanted_offer])
What's @B here? It would seem to be an instance variable of some
object, but it's wierd to be in uppercase.
All runtime indications seem OK (no error, barfs, etc.) - the logs
seem ok too but A does not seem to be getting written in the table.
What am I missing?
Does A have any validations which might be failing? Remember that the
active record create and save methods will just return false if the
record fails validation. The create! and save! will raise an
exception.
If b is an instance of B then you might want to use
b.a.create!(params[:wanted_offer]]