On 12 September 2015 at 05:00, Luis <luismcdougall@gmail.com> wrote:
>
>> Here is the code you ask Colin:
>
>
> _form
>
> simple_form_for @pcp do |f|
> = f.error_notification
>
> .form-inputs.row.col-md-12
> = f.input :name
> = f.input :last
> = f.input :phone1
> = f.input :phone2
> = f.input :bod
> = f.input :esp
> =f.simple_fields_for :medhospitals do |hospital|
> = render 'medhospital_fields' , f: hospital, hindex: hcnt
> = link_to_add_association 'Add a hospital', f, :medhospitals
>
> .form-actions
> = f.button :submit
>
>
> _medhopital_fields:
> .nested-fields.hosplital-fields
> = f.association :hospital ,label: "Hosplital", collection: Hospital.all,
> label_method: :name, prompt: "Select Hospital"
> = link_to_remove_association "Remove", f
I don't see any code there that saves a record.
Colin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsBPL23T7CS1bjHiS4HGs-gaLcDeMvJYv%2B_fdasTEigEw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment