views:

35

answers:

2

I am trying to use an HTTPService to send a string of text to a controller action. How do I access it within the controller? Thanks.

A: 

An easy way to integrate Flex with Rails is to use RubyAMF ( http://code.google.com/p/rubyamf/ ).

James Bobowski
I was hoping I would be able to do something a little more native and simpler. But, thanks.
NJ
A: 

Any parameters you send should be accessible from the params hash in the controller. For example, if I pass a Rails application the URL:

http://localhost:3000/articles/search?q=articles

I will be able to access the value like this:

#in articles_controller.rb    
def search
  query = params[:q]
end
MattMcKnight