I used nifty scaffolding for create controller ‘A’. For this controller
I have in DB table(again called ‘A’).
I have view, in which is a form for entering information. These data
will be stored in database. But was request have in this form input that
isn’t in table ‘A’ (column), but in table ‘B’.
<%= form_for @a do |u| %>
<%= u.error_messages %>
<%= u.label :name %>
<%= u.text_field :name %>
<%= u.label :age %>
<%= u.text_field :age %>
<%= u.label :email %>
<%= u.text_field :email %>
Input called ‘name’ will be stored in table ‘A’ (into column ‘name’),
input called ‘age’ will be stored in table ‘B’ (into column ‘age’).
I want display this form in browser, I am getting error:
undefined method `age’ for…
Can you help me, please, what is needed for this situation for right
displaying the form?