Situation: 

Model member has one-to-one relation with health_data and creates its
child health_data through a before_create callback. Member controller
includes :health_data in its update_columns. Members_helper defines
options_for_association_conditions to exclude :health_data, so there is
no "add existing" button. 

 

Problems with create new member:

*         When creating a new member, there is a "replace with new"
button on the health data subform. 

*         health_data parameters are passed to the controller but they
have no effect ... the health_data record is blank on creation. This is
true whether I create the records via before_create or after_create. (If
I do neither and assume that AS will create the child records, I get a
recursion overflow error). I have only worked around this problem by
manually updating health_data in a member method override, do_create

 

Problems with update member

*         Again, there is the useless "replace with new" button.

*         With a horizontal layout of health_data, existing health_data
record is not even shown in the subform (blanks are shown) and updates
to it do not work with or without clicking the "replace with new"
button.
Adding config.subform.layout = :vertical to the health_data controller
solves this problem, strangely enough.

 

Any thoughts?

 

--Mike Blyth

 

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.

Reply via email to