How to pass foreign key attributes down through a nested form in Rails 3
问题 I have three models: class Client < ActiveRecord::Base has_many :balancesheets has_many :investment_assets, :through => :balancesheets class Balancesheet < ActiveRecord::Base belongs_to :client has_many :investment_assets, :dependent => :destroy accepts_nested_attributes_for :investment_assets, :allow_destroy => true class InvestmentAsset < ActiveRecord::Base belongs_to :balancesheet belongs_to :client I have two questions that have to do with the foreign key client_id. First, when I create a