-2

I am new to ROR and i am trying to add a many to many association between emp and qualification.

https://github.com/clementprem/ROR---Basics

please check the above repo and can you please help me to add relationship data in the association table through check boxes.

Clement Prem
  • 3,112
  • 2
  • 23
  • 43
  • 3
    Nobody is going to go through you entire app to find out where you are having problems. Please tell us exactly what you have tried and what specific problems you have encountered. If you have not tried yet, then go back, try it yourself, and then come back with more specific questions. It might also be good to read the site FAQ: http://stackoverflow.com/faq – sosborn Mar 26 '12 at 08:04
  • thanks for your reply. I am having problems in passing the check box values to the association table. – Clement Prem Mar 26 '12 at 08:23
  • What kind of problem? Is there an error message? – sosborn Mar 26 '12 at 08:29
  • thanks for your reply. I am having problems in passing the check box values to the association table. I can print the values of qualification in the form but cant add the values to the emps_qualifications(association) table. I thought it is an automatic process when we add habtm tag in the models – Clement Prem Mar 26 '12 at 08:29
  • Please edit your question to include the code where you are trying to create the associations. Also, see Naveed's suggestions. – sosborn Mar 26 '12 at 08:31
  • possible duplicate of [Rails find\_or\_create by more than one attribute?](http://stackoverflow.com/questions/3046607/rails-find-or-create-by-more-than-one-attribute) – Clement Prem Apr 16 '15 at 07:13

1 Answers1

2

for many to many association you need an intermediate join table may be you have missed it? .Have a look at

http://guides.rubyonrails.org/association_basics.html#choosing-between-has_many-through-and-has_and_belongs_to_many

Naveed
  • 11,057
  • 2
  • 44
  • 63
  • i have got the schema under migration and it also exist in the db (table name is :emps_qualifications) my problem is the values are not added to the associate table – Clement Prem Mar 26 '12 at 08:36