activerecord - rails accepts_nested_attributes_for :reject_if not working -
I turned on to try to override the auto save parameter because I do not think so Can be done I moved order to shipping address model has_shipping_address and now I have it: #model .. class orders & lt; ActiveRecord :: Base is_to: billing_address belongs_to: shipping_address ac_secures_nested_attributes_for: billing_ address acceptations_nested_attributes_for: shipping_address ,: reject_if = & gt; Proc {| Properties | | Features ["has_shipping_address"]! = '1'} DEF after_initialize self.build_billing_address until billing_address self.build_shipping_address shipping_address addresses end end class shipping & lt; Order eder attr_accessor: has_shipping_address end class order adapter & lt; ActiveRecord :: Base validates_presence_of: name # More assumptions here .. see end # & lt;% form_for @ order do | F | & Gt%; # ... for & lt;% f.fields_: shipping_address do | Addr_f | & Gt%; & Lt;% = addr_f.check_box: has_shipping_ad...