RestFul with RJS


I am using the plugin simply Restful. I would like to use also RJS. So i
try to make a li test.

in index.rhtml

Ajouter une nouvelle catégorie
<% form_remote_for :faq_category, :url => faq_category_url, :html =>
{ :method => :post } do |f| %>
<%= error_messages_for (:faq_category) %>

Libelle <%= f.text_field
:libelle_fr %>

La catégories est visible <%= f.check_box(:est_valable) %>

<%= submit_tag ‘ajouter’ %>
<% end %>

<%= link_to_function(‘Annuler’, “Element.toggle(‘add_category’)”)

in my controller
def create
@faq_category = params[:faq_category ]! #intecepte toutes les erreurs de sauvegardes
redirect_to_index (“nouvelle catégorie crée”) #Redérige à la vue
rescue ActiveRecord::RecordInvalid #intercepte les execeptions
render :action => “new”

in my RJS ‘new.rjs’
page.alert ‘test’

So when i try to add a new category it’s working however i don’t see the
alert in my new.rjs

Thanks for your help

I have alse a problem with edit method
<%= link_to_remote (“Edit”,
:update => ‘div_categorie’,
:url => edit_faq_category_path(t)) %>
When i test to use link_to_remote i can see this error message

Routing Error

no route found to match “/faq_categories/1;edit” with {:method=>:post}