I ran into this problem a while ago and gave up. Here's a new post
hoping someone knows how to do this:

I want to pass a model into a web method as a param. For example i
have a model Thing. On the thing controller i have

def index
   @thing1 = some code to pick a random thing
   @thing2 = some code to pick another random thing that's not the
same as the first thing
end

web-method :vote
   @this.win
end

on the view I show @thing1 and @thing2. Each thing has a form with the
web-method vote. Now lets say you submit the form for thing1. As
written above it works fine. My problem is not only do I want the web-
method to call win on thing1, but also lose on thing2. you can access
thing1 with @this easily, so how do i pass it a reference to thing2?

Psuedo code is as follows:

web-method :vote(modelReference)
   @that = modelReference
   @this.win
   @that.lose
end

can this be done? What does the syntax look like?

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en.

Reply via email to