search for: zz_user_id

Displaying 1 result from an estimated 1 matches for "zz_user_id".

Did you mean: ap_user_id
2011 Feb 26
1
How to manage the form of a model that has two foreign keys
...ActiveRecord::Base has_many :godfathers # for user_id has_many :godfathers, :foreign_key => "user_godfather_id", :class_name => "Godfather" accepts_nested_attributes_for :godfathers end class Godfather < ActiveRecord::Base belongs_to :zz_user_id, :class_name => "User" belongs_to :user_godfather_id, :class_name => "User" end Now my question is about how to manage the edit form of this nested attribute relationships. Here is how my form looks like at the moment (using the nested_form_for gem): <...