Not sure if this the best place to look for rails 3.0 beta 3 help, but I'll give it a try.
I can't seem to get nested forms to work in the beta - close but no workie!
I used an approach similar to one I used in a 2.3 application to update a user record from a profile record (citizen has_one :user, accepts_nested_attributes_for :user ) except I'm try to create a user record from a has_many relation (initial registration for a new group/ subdomain)
class Group < ActiveRecord::Base has_many :users accepts_nested_attributes_for :users, :allow_destroy => true end
I have my nested form set up with:
<%= f.fields_for :user, @user do |user_fields| %> ...
The form builds, but not the same has in 2.3
For instance, in 2.3 I'll get:
name="group[user_attributes][password_confirmation]"
in 3 I'll get:
name="group[user][password_confirmation]"
submitting the form will generate an error with unknown variable "user"
Has anyone gotten nested forms to work in 3? Am I missing some new approach that sets [group][user_attributes] instead of [group] [user]? Do you have to do something different with a nested has_many relation? (since I assume it would normally be an array)
Steve Alex