Noob filter: How do I refer to a string that is passed to my Ruby on Rails method from Flex as a HTT
Posted
by ben
on Stack Overflow
See other posts from Stack Overflow
or by ben
Published on 2010-04-27T03:14:36Z
Indexed on
2010/04/27
4:13 UTC
Read the original article
Hit count: 395
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!
© Stack Overflow or respective owner