samedi 25 avril 2015

I want to retrive data with javascript action in rails app


I have a ruby on rails app. In the app I have a member model with specific number called bd number. I have another model named earning. In the earning model I need to enter the member data because each earning belongs_to a member. In the form_for member_id I have used collection_select which outputs with a drop down list with bd number. which shows bd number in the list but saves the member_id in database. Now the problem is I want to make the collection_select form to be editable like I enter a name or bd number it will list and filter the members below and if I select one, it(bd) will be entered inside the form and the member_id will be saved and the name of the member will be retrieved from the data base and shown in another form below.

I don't have permission to post image so I am giving an external link to see the image. http://ift.tt/1GsWKBO


Aucun commentaire:

Enregistrer un commentaire