search for: add_skills

Displaying 4 results from an estimated 4 matches for "add_skills".

2006 Jun 21
0
how to save objects associated via has_many :through?
...k. Please correct me where I''m wrong. # in some controller, assume a form is being passed in to fill out the # Technician and Skill objects def add_technician_with_skills @technician = Technician.new(params[:technician]) @skills = Skills.new(params[:skill]) begin @technician.add_skills(@skills) @technician.save! rescue => err # error handling end # other processing end # in technician.rb model def add_skills(skills) begin cert = Certification.new(:technician => self, :skill => skills,...
2006 Jun 22
0
how to save objects in a has_many :through association?
...k. Please correct me where I''m wrong. # in some controller, assume a form is being passed in to fill out the # Technician and Skill objects def add_technician_with_skills @technician = Technician.new(params[:technician]) @skills = Skills.new(params[:skill]) begin @technician.add_skills(@skills) @technician.save! rescue => err # error handling end # other processing end # in technician.rb model def add_skills(skills) begin cert = Certification.new(:technician => self, :skill => skills,...
2006 Feb 27
6
One to Many example... please!
Hi, I am pulling my hair out trying to work out how to put together what should be a simple app in rails. The app is to CV''s so I have a table of CV''s and each CV can have multiple skills. Skills are in a 2nd table below; CREATE TABLE cvs( id INT not null AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(30) not null, family_name VARCHAR(30) not null, email
2006 Mar 04
5
has_many and belongs_to example?
Hi! If i have 2 tables i.e. product and images and product has_many images, image belongs_to product - how to create _form.rhtml, new/create and edit/update methods in product controller, so in a single form i can add one product and MANY (let''s assume for now that this number is fixed) images for this product? Pleeeeease help me :) -- Posted via http://www.ruby-forum.com/.