Mar 11 00:00
bradgonesurfing joined #sinatra
Mar 11 00:12
Mar 11 00:19
Mar 11 00:32
Mar 11 00:40
loincloth joined #sinatra
Mar 11 00:45
Mar 11 00:52
bmizerany joined #sinatra
loincloth joined #sinatra
Mar 11 01:03
Mar 11 01:21
philly-mac joined #sinatra
Hi, anyone here have experience using the padrino-framework that sits on top of sinatra?
bmizerany joined #sinatra
Mar 11 01:33
bradgonesurfing joined #sinatra
Mar 11 01:46
Mar 11 01:56
Mar 11 02:31
Mar 11 02:37
Mar 11 02:52
Mar 11 03:05
jeremyevans joined #sinatra
Mar 11 03:23
loinclot_ joined #sinatra
Mar 11 03:31
Mar 11 03:41
loincloth joined #sinatra
Mar 11 03:48
loincloth joined #sinatra
Mar 11 03:54
tbuehlmann joined #sinatra
Mar 11 04:01
futurechimp joined #sinatra
Mar 11 04:08
how do i get current app :env option?
Mar 11 04:29
Mar 11 04:40
alexmchale joined #sinatra
Mar 11 05:05
huma, `settings.environment'
(`options' is an alias for settings)
Mar 11 05:12
huma, also, settings is only available from 0.9.5 onwards
hey, are there any helpers to make a (DELETE|PUT) Request from a view?
zelnick: you can use the _method hack.
zelnick, in what sense? Via AJAX?
im trying to keep my application restful
so i just want to delete a resource in the db...
zelnick, as harryv said, just do a POST, and have a parameter called '_method' set to either 'put' or 'delete' depending on what you want to do
the MethodOverride Middleware will then convert the POST to the appropriate HTTP verb
thats how rails does it, right?
they use the same middleware
if you have a top level app it's enabled by default. if you subclass Sinatra::Base you have to `enable :method_override` (in some earlier version its :methodoverride iirc)
Mar 11 05:22
Mar 11 05:38
Mar 11 06:04
warthurton joined #sinatra
warthurton joined #sinatra
Mar 11 06:18
hi all. i want to apply a filter only to certain routes, how to do that? is it possible at all?
you have to check the route, if that wasn't changed
right, I assumed you are already working with it
Mar 11 06:30
Mar 11 06:40
hipertracker joined #sinatra
i don't know what it means to "check" the route
Mar 11 06:45
anyone with experience with sinatra in GAE?
santiago, if request.path =~ %r{/some/route}; ...; end
^ check if it's the route you want to handle in your before filter
could be something better
anyone with experience deploying sinatra to GAE?
santiago, you can also define multiple handlers with the same route, and simply call `pass' if the handler thinks it can't handle the request
then sinatra will pass the request to the next handler with the same route
Mar 11 06:55
Mar 11 07:02
Mar 11 07:08
no no this is what i need. request.query_string
santiago: i know people who have deployed sinatra to GAE, what's wrong?
Mar 11 07:28
kristopher joined #sinatra
SkramX: only route that works is '/', whenever i use another route GAE complains by telling the file does not exist
Mar 11 07:33
in the changelog for 0.9.2, there were some GAE fixes
Mar 11 07:41
santiago, are your paths prefixed with a '/'?
ie., get '/foo/bar', or get 'foo/bar'?
just test it with one URL
it is only happening with POST routes
Mar 11 07:49
with GET work aright, the prob happen with POST routes
Mar 11, 2010 2:48:54 PM com.google.appengine.tools.development.LocalResourceFileServlet doGet
WARNING: No file found for: /project.html
the is the route "/project", later "project" as you suggested
it seems that GAE is passing a GET request to sinatra, i think that because of this ... Mar 11, 2010 2:48:54 PM com.google.appengine.tools.development.LocalResourceFileServlet doGet
loincloth joined #sinatra
Mar 11 07:55
santiago, I've never done anything with GAE (or jRuby, for that matter), so I can't help you there
Mar 11 08:02
stepheneb joined #sinatra
Mar 11 08:09