Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NameError in Users#new
- Showing users/_address.html.erb where line #4 raised:
- `@user[address_attributes][]' is not allowed as an instance variable name
- Extracted source (around line #4):
- 1: <div class="address">
- 2: <hr />
- 3: <% fields_for "user[address_attributes][]", address do |a| %>
- 4: <%= a.error_messages %>
- 5:
- 6: <p>
- 7: <%= a.label :address1 %><br />
- ################################################################################
- The partial is called like this:
- <%= render :partial => 'address', :locals => {:user => @user} %>
- ################################################################################
- In the User model, address_attributes is defined as a virtual attribute:
- def address_attributes=(address_attributes)
- logger.info "=====> inside address_attributes"
- address.build(address_attributes)
- end
Add Comment
Please, Sign In to add comment