search for: showmateri

Displaying 1 result from an estimated 1 matches for "showmateri".

Did you mean: showmaterial
2006 Feb 20
4
Obtaining the ID of a newly saved model object
Hi, I''m struggling with this and I''m not sure if it is obvious or dumb (or both). I have a basic create method like so: def creatematerial @material = Material.new(params[:material]) if @material.save flash[:notice] = "Material successfully created." end Ok so far, but now I want to retrieve that object that was just saved so that it can be used in the