R
rexlorenzo
Hello,
I am having a huge problem representing objects in my forms with Rails'
FormHelper.
Object setup:
apt_transactions :has_many transaction_participants
Value setup:
apt_transactions has a value of monetary_total
transaction_participants has a value of monetary_share
Problem:
Now, I am trying to have a form in which a user can enter in data in
which they can set the monetary_total and specific how that total is
divided amoung the transaction_participants.
Now, my question is, how can this relationship be represented in a
form?
I am having trouble getting the FormHelper to work:
<%= text_field("apt_transaction_transaction_participants[]",
"monetary_share") %>
produces a NoMethodError exception
I have no clue how this will be represented in a form. For example,
would it appear as:
<input type="text"
name="apt_transactions[transaction_participants][][monetary_share]" >
I have no clue...
I am having a huge problem representing objects in my forms with Rails'
FormHelper.
Object setup:
apt_transactions :has_many transaction_participants
Value setup:
apt_transactions has a value of monetary_total
transaction_participants has a value of monetary_share
Problem:
Now, I am trying to have a form in which a user can enter in data in
which they can set the monetary_total and specific how that total is
divided amoung the transaction_participants.
Now, my question is, how can this relationship be represented in a
form?
I am having trouble getting the FormHelper to work:
<%= text_field("apt_transaction_transaction_participants[]",
"monetary_share") %>
produces a NoMethodError exception
I have no clue how this will be represented in a form. For example,
would it appear as:
<input type="text"
name="apt_transactions[transaction_participants][][monetary_share]" >
I have no clue...