RJS not working

Not entirely sure what I need to change here to make this work:

I have a form in a partial _new.rhtml

In the form (right below) I call to the canskill partial which shows the
current entries:

<%= render :partial => 'canskills/canskill', :collection => @ candidate.canskills %>
Skill Skill level Skill experience Sill last used

Enter skill information

<% remote_form_for :canskill, :url => canskill_url, :candidate_id => @candidate_id, :html => { :id => 'canskill-form' } do |form| %> ........................... # all the form elements ..............

<%= submit_tag “add skill” %>
<% end %>

new.rjs looks like this:
page.insert_html :bottom, ‘canskills’, :partial => ‘canskill’
page.form.reset ‘canskill-form’

One of the problems is as a new form it loads up the form and then calls
create to input the data -

def new
@canskill = Canskill.new
@candidate_id = params[:candidate_id]
render :partial => ‘new’

def create
@canskill = Canskill.new(params[:canskill])
@candidate_id = params[:candidate_id]

The problem is it continues to look for a create.rhtml but doesn’t
the canskill partial ?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs