Noob filter: How do I refer to a string that is passed to my Ruby on Rails method from Flex as a HTT
- by ben
I have a HTTPService in my Flex 4 app that I call like this:
getUserDetails.send(userLookup.text);
In my Ruby on Rails method that this is linked to, how do I refer to the userLookup.text parameter? The method is as follows, with XXX as the placeholder:
def getDetails
@user = User.first (:conditions => "username = XXX")
render :xml => @user
end
UPDATE:
Is this way correct? I found it here. I'm still getting errors but it might be because of something else.
def getDetails(lookupUsername)
@user = User.first (:conditions => "username = '#{lookupUsername}")
render :xml => @user
end
Thanks for reading!