These are chat archives for opal/opal

3rd
Aug 2015
CJ Lazell
@cj
Aug 03 2015 15:56
morning…. anyone know how to set the headers on sprockets?
@elia I know we’ve talked about this before, I’m just trying to put a hack together so that you can set the headers in the opal server
Mitch VanDuyn
@catmando
Aug 03 2015 16:41
fyi - if anybody is interested I just posted a progress report about our work with react + opal + rails + active record: http://metaruby.com/t/opal-react-isomorphic-ruby-that-plays-well-with-rails/56/11?u=catmando
CJ Lazell
@cj
Aug 03 2015 17:14
so according to this I can just add -323f23f (some random number) and it will add a long expires header. that works fine in debug mode naming the file wedge.self-0aa2105d29558f3eb790d411d7d8fb66.js but when you remove self and just have wedge-0aa2105d29558f3eb790d411d7d8fb66.js when debug mode is off, it gives file not found
CJ Lazell
@cj
Aug 03 2015 17:35
Elia Schito
@elia
Aug 03 2015 18:02
@cj seems the right way, I don't think there's any official support for setting headers in sprockets
Rick Carlino
@RickCarlino
Aug 03 2015 19:39
Anyone have advice on how to better inspect elements while debugging Opal code? It seems like when I print some objects, they just return an empty line instead of debug info. Are there any strategies to deal with this?
meh.
@meh
Aug 03 2015 19:43
RickCarlino, how do you print them?
Rick Carlino
@RickCarlino
Aug 03 2015 21:04
Sometimes I do puts, other times I backtick and do a JS console.log
I can try to find a good example and raise a legitimate issue if its just me.
Elia Schito
@elia
Aug 03 2015 21:10
@RickCarlino try with p or pp (after require 'pp')
Rick Carlino
@RickCarlino
Aug 03 2015 21:16
@elia ah, had no idea they were different. Always thought p was just an alias for puts. Thanks for the help!
Elia Schito
@elia
Aug 03 2015 21:18
p its useful also bc it returns the inspected value
@RickCarlino learned while implementing it lol :)
pp sends the object to console.log (when in a browser)
@RickCarlino well, in case you didn't know what to podcast about… : )
Rick Carlino
@RickCarlino
Aug 03 2015 21:20
Hahaha, I already put it in my "idea book".