I’m using rails 3.0…
I have, among others, a controller/model for both provers and
certifications. I’m rendering a partial list of certifications in a
I want to use Ajax to refresh the certificaton partial and clear the
“new certification” fields when a new certification is added.
I have a “create.js.rjs” file that lives in the /views/certifications
directory and gets called from the “create” method in /controller/
certifications. Here is the contents of that file:
page.replace_html(‘certs’, render(’/provers/certs’)) <-- probably
No matter how I configure the .rjs file it does not work and the
problem appears to be that because it is not in the /views/provers
directory it doesn’t know what to do.
What am I doing wrong…?
With the insertion of a new certification I want to update a field in
the “provers” table of the database. With that in mind, I have the
“create” method in the certifications controller setup as follows:
@prover = Prover.find(params[:id => @certification.prover_id])
I want to set the associated field “cal_flag” in the table to false
@prover.cal_flag = false
When I run this I get a can’t find with id = nil error…(obviously
not finding the prover with the foreign key “prover_id”)
Thanks in advance for any/all help…!