I\'m having trouble getting a has_many :through association working with Rails 4\'s strong parameters. I have a model called Checkout and I need to select a per
I can post the permit statement I use in one of my controllers. This has a many to many association as well. You nest the permit array. Use the lookup association in your permit statement. The only difference should be that yours won't be nested a third time.
In my case, the association
Quote
has_many :quote_items.
QuoteItems has_many :quote_options, :through => quote_item_quote_options.
In quotes_controller.rb
params.require(:quote).permit(:quote_date, :good_through, :quote_number, quote_items_attributes: [:id,:quote_id, :item_name, :material_id, quote_item_quote_options_attributes:[:quote_option_id,:quote_item_id,:qty,:_destroy,:id]])