Your form f
is based off of a Transaction
object, which has_many :tickets
. I believe you should be using the plural :tickets
rather than the singular :ticket
in your fields_for
.
<%= f.fields_for :tickets do |t| %>
If you always want a new ticket, you may need to do:
<%= f.fields_for :tickets, Ticket.new do |t| %>
to ensure that a create form shows up.