I am trying to add a controller method that will take an XML post with
a schema not related to an existing model and parse it as a hash of
parameters.  I create apis_controller.rb:

class ApisController < ApplicationController
  def create
    puts "**** API INVOKED ****"
    puts params[:name]
  end
end

Then...

curl --data-urlencode "<name>Foo</name>" -H "Content-Type:application/
xml" http://localhost:3000/apis.xml

I get the following error:

  Status: 500 Internal Server Error
  undefined method `name' for nil:NilClass

Is there a way for "puts params[:name]" to display "Foo" upon
receiving the XML post?

Thanks in advance!
Mark

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to