I have two models cliente.rb
and atendimento.rb
, both already with their associations . When I am going to generate a new service with collection_select
select the name of the client, the problem and what I would like at the time of selecting the client other fields like address, phone would also come automatically to my form, for example: in my register I have a name, a phone number, an address, etc. Already in my service registration I have the name of the client (I search through collection_select
), telephone of the client (I want it to be filled automatically when selecting the client), address, etc.