02:32
alexeyKolosov joined
04:09
<Johnnus_>
i'm having some problems that i suspect are related to ruby more than sinatra, maybe i'm not understanding namespacing correctly? could anyone have a look? http://pastie.org/private/mk47bz7kksid6vzromin2a
04:11
<Afal>
how are you running this?
04:13
<Johnnus_>
rackup on the config.ru file, it just mounts the application on /
04:13
<Johnnus_>
with Rack::URLMap
04:15
<Johnnus_>
For some reason the routes does not find the model classes, i'm guessing it's not enough to require them in app.rb that includes the module where the routes are defined.. but not sure where to include the models then, to have the routes access them
04:16
<Afal>
I'm not sure :\
06:06
antinitro___ joined
08:53
<msch>
hi, is there a way to split one sinatra app into multiple files?
08:55
<tbuehlmann>
sure, just do so and require the files
09:17
<msch>
tbuehlmann: k.
09:17
<msch>
tbuehlmann: and is there a helper for redirecting with a certain status? e.g. 201 Created ?
09:21
<tbuehlmann>
yep, `redirect '/foo', 201`
09:41
<Rennex>
except 201 is not a redirection
09:42
<tbuehlmann>
correct
11:16
thomasdebenning joined
12:30
thegeekinside joined
13:01
<Mathetes>
[00rss] <dhill.nov...@gmail.com (ssswdon)> using erb/haml methods from a service layer - http://z.pist0s.ca/10iK
13:29
TrevorBramble joined
15:26
bingomanatee_ joined
17:06
<regedarek>
i have problem
17:08
<tbuehlmann>
let hear
17:10
<regedarek>
ttps://github.com/regedarek/hkshop this is my project
17:11
<regedarek>
https://github.com/regedarek/hkshop
17:11
<regedarek>
I trying too add active record
17:12
<regedarek>
but when im trying to run rake -T
17:12
<regedarek>
i recieve error no such file to load -- hkshop.rb
17:13
<tbuehlmann>
using rails >=1.9.2?
17:14
<tbuehlmann>
try `require_relative 'hkshop', `require './hkshop'` or add "." to the load path with `$LOAD_PATH.unshift '.'`
17:15
<regedarek>
ok, im trying to follow this doc https://github.com/bmizerany/sinatra-activerecord
17:16
<regedarek>
thanks, ./hkshop works
17:34
<chiel>
Hi all. What is the proper way to unset a header that sinatra sets by default? currently I am simple setting the header to an empty string, but that seems kinda... dirty.
17:40
<tbuehlmann>
it's actually just a hash, so you can delete key value pairs from it with `headers.delete 'key'`
17:40
<chiel>
oh, okay, sweet :)
17:40
<chiel>
i did not know that :D
17:40
<chiel>
tbuehlmann: thanks! :)
17:40
<tbuehlmann>
welcome!
17:43
<chiel>
tbuehlmann: awh, it doesn't work. :(
17:43
<tbuehlmann>
it should!
17:43
<tbuehlmann>
have an example?
17:43
<chiel>
I'm trying to delete the X-Frame-Options header, so it should be `headers.delete 'X-Frame-Options'`, right?
17:44
<tbuehlmann>
think so, yes
17:44
<chiel>
cause it's an iframe, and it's saying "Refused to display document because display forbidden by X-Frame-Options."
17:44
<chiel>
which will only happen if it's set
17:45
<chiel>
if i do `headers 'X-Frame-Options' => ''` it works just fine
17:45
<chiel>
it just seems kinda disgusting to have an empty header
17:45
<chiel>
hence my wish to improve it :)
17:47
<tbuehlmann>
yea, I see..
17:52
<tbuehlmann>
well, works for me as expected
18:26
<chiel>
tbuehlmann: really? O.o
18:26
<chiel>
damn that's weird :)
18:27
<chiel>
tbuehlmann: I get "
18:27
<chiel>
"X-Frame-Options: sameorigin"
18:27
<chiel>
even if I do headers.delete 'X-Frame-Options'
18:29
<regedarek>
Hi guys, i would like to use custom encryptor in Warden like this: https://github.com/plataformatec/devise/wiki/How-To:-Create-a-custom-encryptor
18:29
<regedarek>
it is possible??
18:29
<regedarek>
becose i need double MD5
18:39
thomasdebenning joined
19:07
<regedarek>
i found https://github.com/shuber/encryptor aybe i need this??