0
나는 모델이있다. 다음 나는이 해당 작업에레일 관계는
match "/:donor" =>"pages#donation", :as => :donor
- -
@donor = Donor.find_by_name(params[:donor])
기증자의 이름이 데이터베이스에 이미
나는 다음과 같은 경로를 가지고있다.
<%= form_for @donor do |f| %>
<div class="field">
<%= f.label :name, "Name" %> #this is prepopulated with their name - but they can change it.
<%= f.text_field :name, :class=>"input-text" %>
</div>
<div class="actions">
<%= f.submit "Submit" %>
</div>
<% end %>
가 어떻게 그 형태에 수신자 정보를 추가 할 필드를 추가 할 수 있습니다 -
그리고 내가 가지고있는보기
?
감사합니다. accepts_nested_attributes_for는 제가 찾고있는 것입니다. – Finnnn