Expose a has_many relationship through a single text field
问题 I have a model A that "has many" B. class A < ActiveRecord::Base has_many :B attr_accessible :title end class B < ActiveRecord::Base belongs_to :A attr_accessible :name end I want to add a field to my "edit A" form : a textarea in which I will enter my B's :name for each line, and on submit, parse the field, and process each line. The question is, how should I do that ? Edit Following Rails - Add attributes not in model and update model attribute I have come to this : class A < ActiveRecord: