Hi,
That is strange, I would have thought that the first one would work. Are you sure you are running edge and have simply_restful installed ?
I have found that one of the best REST apps to learn from is RestoLog :
http://bgjap.net/code/ruby/ror/
I would go through their code and see where it differs to yours. Their create statement goes like this :
# gets called when for POSTs to /articles def create @article = Article.new(params[:article]) @article.user = current_user @article.save! respond_to do |format| format.html do flash[:notice] = "Article was successfuly created" redirect_to article_url(@article) end format.xml do headers["Location"] = article_url(@article) render :nothing => true, :layout => false, :status => "201 Created" end # format.js end rescue respond_to do |format| format.html { render :action => 'new' } end end
I hope this puts you in the right direction. Sorry I can't be of more help.
Kind Regards Hamza
Ingo Weiss wrote: