Ray, I owe you a beverage for pointing me in the right direction.
You were right - it turns out that code I thought was finding my
@document, wasn't. In fact, the web-method wasn't even getting the
parameter by which I was searching. Thanks for suggesting I check the
parameter. That was the kicker.
In my web-method call, I had to add a 'params' attribute as follows:
<form web-method="addparcel" method="POST" params="&{'document_id'=>
this.id}" update="parcels-table">
....
</form>
Also, in the 'addparcel' web-method, I had to be sure to load the
@document object BEFORE calling hobo_ajax_response:
def addparcel
# Must load document BEFORE hobo_ajax_response
@document = Document.find(params[:document_id])
logger.info "Document found: " + @document.name
hobo_ajax_response do
# Other logic here
end
end
Thanks again, Ray. This one cost me a few days.
Tim
--
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.