Displaying 3 results from an estimated 3 matches for "cv_id".
Did you mean:
cb_id
2006 Feb 27
6
One to Many example... please!
...city varchar(30) not null,
county varchar(30) not null,
post_code varchar(9) not null,
created_on timestamp(14) not null,
updated_on timestamp(14) not null
);
CREATE TABLE skills(
id INT not null AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(20) not null,
detail VARCHAR(200) not null,
cv_id int not null,
created_on timestamp(14) not null,
updated_on timestamp(14) not null,
constraint fk_skills_cv foreign key (cv_id) references cvs(id)
);
Now, I think the db is as it should be from what I have been able to
gleen from Agile..., 4 days... and OnLamp...
So now I have the view for...
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/.
2006 Mar 04
1
validation for items in a 1 2 many
I am populating a table skills which relate to a table cv in a 1 cv to
many skills relationship...
I populate the skills as below;
def new
@session[:cv_id] = params[:id]
@skill = Skill.new
end
def create
@cv = Cv.find(@session[:cv_id])
@cv.skills << Skill.new(params[:skill])
if @cv.save
flash[:notice] = ''Skill was successfully created.''
redirect_to :action => ''show'', :contr...