On Apr 8, 11:52 am, Kevin Smith <[email protected]> wrote:
> Hi everyone,
>
> Using the wonderful Sinatra to create a RESTful Web service. What I want
> to do is:

You might note this isn't a sinatra group.

>
>   # OK, send the JSON response...
>   trans.to_json

Not very familiar with sinatra, but I don't think this sends anything
at all - sinatra uses the result of the last expression in the block
as its response
If you do something else after this, then that's what sinatra will use
as its response

Also, beware global variables - if you ever got concurrent requests
your code would do horrible things

Fred
> end
>
> --
> Posted viahttp://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to