These are chat archives for opal/opal

19th
Jan 2016
Cassio Godinho
@cpgo
Jan 19 2016 00:50
@elia , Im very new to opal and front end in general. I'm currently working with Vue.js. Would it be too much work to try and wire opal and vue together?
Elia Schito
@elia
Jan 19 2016 00:56
@CassioGodinho it shouldn't be very difficult but I wouldn't advise it as the first task. If you still want to undertake such a challenge I suggest looking at how it's done in Opal-jquery and Opal-browser (in addition to reading the guides of course) :)
Cassio Godinho
@cpgo
Jan 19 2016 01:00
Thanks @elia, I will take a look at opal-jquery
Martin Becker
@Thermatix
Jan 19 2016 10:22
would the following work in opal?
for_ident = args.shift if args.first.is_a? Symbol
I'm guessing it wouldn't but I just want to make sure, any way to deal with this better?
Elia Schito
@elia
Jan 19 2016 10:34
It works unless you need to differentiate between String and Symbol
Martin Becker
@Thermatix
Jan 19 2016 10:36
ah....
bollox
ah I mean bugger...
...
nvm that's not much better
I'm getting a non-helpful parsing error
I'm doing :
            button class_name: "mui-btn mui-btn--primary" do
              "Previous renders"
            end.on(:click) do
              state.display_prev_renders_modal!(true)
            end
but it's erroring on the do
if I remove the block it works fine
what is it that I'm not seeing that's causing the error?
Elia Schito
@elia
Jan 19 2016 10:44
@Thermatix remove stuff untill you understand what exactly is causing the error
Martin Becker
@Thermatix
Jan 19 2016 10:45
I did, it's the block itself, if I comment out the block it works, adding it in and it breaks, but it should work that's why I don't understand it
I've had a block like this before so why it shouldn't work doesn't make sense
obviously I've missed somthing but I just don't see it
... but
changing the first block to be brackerts... AH
I get it
it's a precedent's issue
changing the first block to braces fixes it
Martin Becker
@Thermatix
Jan 19 2016 11:11
that's super anoying
Elia Schito
@elia
Jan 19 2016 11:14
please open an issue unless there's already one
Martin Becker
@Thermatix
Jan 19 2016 11:20
done!
Elia Schito
@elia
Jan 19 2016 11:20
thanks
Martin Becker
@Thermatix
Jan 19 2016 11:20
opal/opal#1299
Forrest Chang
@fkchang
Jan 19 2016 19:18
@/all DDH's explanation on the Rails Doctrine http://rubyonrails.org/doctrine I want to write something similar as to why I would prefer to do opal over js
Mitch VanDuyn
@catmando
Jan 19 2016 20:21
anybody remember how to update Element so it accepts new methods (like .datepicker)... I believe there was an easy way???
got it... Element.expose
Jared White
@jaredcwhite
Jan 19 2016 23:02
@fkchang I read that today as well, and that was my first thought -- not that there's an "Opal Doctrine" per se as Opal isn't a framework but a platform to build frameworks on top of -- something more along the lines of "The Ruby in the Browser Manifesto" or whatever. Totally would love to see what you come up with!
Elia Schito
@elia
Jan 19 2016 23:03
@catmando side note: on master you should be able to leverage method_missing for that