Further updates on my question above:

what if I have a helper method to store the "current_patient", having
always the last patient from my search query and on my
hospitalizations_controller I build the Create method something like this:
@hospitalization =
current_patient.hospitalizations.new(hospitalization_params) ? Would this
be the best way to work around this?



Diego Dillenburg Bueno
Graduando em Ciências da Computação
UNESP - Rio Claro
(12) 98116-7741
<https://www.facebook.com/diegodillenburg>
<http://br.linkedin.com/in/diegodillenburg>
<https://github.com/diegodillenburg>


2015-01-13 10:50 GMT-02:00 Diego Dillenburg Bueno <diegodillenb...@gmail.com
>:

> Hey there,
>
> I have a patients model which has many hospitalizations, from the
> patients#show I want to generate a link to hospitalizations#new creating a
> new association to this very same patient, any ideas on how to do that? I
> want it to when I get to the hospitalizations#ne I be able to manipulate
> the output the patient data in the generated view and submit a
> Patient.hospitalizations.create, how would be the best approach for that?
>
> Thanks in advance,
>
> Diego Dillenburg Bueno
> Graduando em Ciências da Computação
> UNESP - Rio Claro
> (12) 98116-7741
> <https://www.facebook.com/diegodillenburg>
> <http://br.linkedin.com/in/diegodillenburg>
> <https://github.com/diegodillenburg>
>
>

-- 
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+unsubscr...@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/CAOHSkmFiKzw_tQ%2BFyzaNROhK%3Dk_PRjh3YmnntivdHgy1GqV%2B9g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to