Forum: Ruby on Rails Simple Post to CookBook

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Sniper 1. (Guest)
on 2009-05-12 02:35
I am trying to post from C# to a simple Ruby on Rails page.
I am using the cookbook of Ruby on rails. So I just want to create a new
category from C#
I do it like this in c#

string url = "http://localhost:3000/categories.xml";
oPostData = ASCIIEncoding.UTF8.GetBytes("category=TestCat");
ie.Navigate2(ref oURL, ref oEmpty, ref oEmpty, ref oPostData, ref

I get this

NoMethodError in CategoriesController#create
undefined method `stringify_keys!' for "TestCat":String
RAILS_ROOT: C:/InstantRails/rails_apps/cookbook

app/controllers/categories_controller.rb:43:in `new'
app/controllers/categories_controller.rb:43:in `create'



Show session dump

:csrf_id: 5dc6b3aa43b099703c798ea053ad9ebb
flash: !map:ActionController::Flash::FlashHash {}


I think I am not supposed to pass the parameter that way. Can anybody
show me where and how I am supposed to post on this. Any help will be
appreciated .
Thanks in advance
Colin L. (Guest)
on 2009-05-12 11:44
(Received via mailing list)
I woudl suggest first you need to determine whether the problem is in
the C#
code or in the server.
Have you looked in the rails log to see if the request being received by
server is as you expect?
If so does that url work if you enter it from a browser?

2009/5/11 Ridha B. <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.