Mosselman

Activity Graph

Page 1 of 6 | Next »

2018-03-26

[04:48:32] Mosselman: has joined #RubyOnRails
[04:52:51] Mosselman: Ping timeout: 240 seconds
[05:31:48] Mosselman: has joined #ruby
[05:31:48] Mosselman: has joined #RubyOnRails
[05:36:14] Mosselman: Ping timeout: 256 seconds
[06:54:07] Mosselman: has joined #ruby
[06:54:07] Mosselman: has joined #RubyOnRails
[08:07:45] Mosselman: Ping timeout: 252 seconds
[08:12:47] Mosselman: has joined #ruby
[08:12:47] Mosselman: has joined #RubyOnRails
[09:04:51] Mosselman: Ping timeout: 240 seconds
[09:06:03] Mosselman: has joined #ruby
[09:06:03] Mosselman: has joined #RubyOnRails
[14:49:35] Mosselman: Ping timeout: 240 seconds
[15:01:22] Mosselman: has joined #ruby
[15:01:22] Mosselman: has joined #RubyOnRails
[15:01:44] Mosselman: Client Quit

2018-03-25

[21:37:27] Mosselman: has joined #ruby
[21:37:27] Mosselman: has joined #RubyOnRails
[21:51:51] Mosselman: Ping timeout: 240 seconds
[22:09:24] Mosselman: has joined #RubyOnRails
[22:09:25] Mosselman: has joined #ruby
[22:14:14] Mosselman: Ping timeout: 256 seconds

2018-03-23

[08:22:58] Mosselman: has joined #ruby
[08:22:58] Mosselman: has joined #RubyOnRails
[11:16:29] Mosselman: Ping timeout: 260 seconds
[11:20:49] Mosselman: has joined #ruby
[11:20:49] Mosselman: has joined #RubyOnRails
[11:36:21] Mosselman: Ping timeout: 264 seconds
[12:02:59] Mosselman: has joined #ruby
[12:02:59] Mosselman: has joined #RubyOnRails
[12:12:57] Mosselman: Ping timeout: 240 seconds
[12:31:34] Mosselman: has joined #ruby
[12:31:34] Mosselman: has joined #RubyOnRails
[15:56:45] Mosselman: Ping timeout: 264 seconds

2018-03-22

[09:33:09] Mosselman: has joined #ruby
[09:40:44] Mosselman: Quit: WeeChat 2.1
[09:40:59] Mosselman: has joined #ruby
[09:40:59] Mosselman: has joined #RubyOnRails
[11:34:54] Mosselman: Ping timeout: 260 seconds
[11:39:01] Mosselman: has joined #ruby
[11:39:01] Mosselman: has joined #RubyOnRails
[11:52:26] Mosselman: Remote host closed the connection
[11:56:05] Mosselman: has joined #ruby
[11:56:05] Mosselman: has joined #RubyOnRails
[12:04:55] Mosselman: Ping timeout: 256 seconds
[12:08:53] Mosselman: has joined #ruby
[12:08:53] Mosselman: has joined #RubyOnRails
[12:17:45] Mosselman: Ping timeout: 264 seconds
[12:20:24] Mosselman: has joined #ruby
[12:20:24] Mosselman: has joined #RubyOnRails
[14:15:57] Mosselman: Ping timeout: 264 seconds
[14:16:17] Mosselman: has joined #ruby
[14:16:17] Mosselman: has joined #RubyOnRails
[14:25:09] Mosselman: Ping timeout: 268 seconds
[14:26:00] Mosselman: has joined #ruby
[14:26:00] Mosselman: has joined #RubyOnRails
[15:16:54] Mosselman: lol, out of the component thinking
[15:17:14] Mosselman: Just render HTML to begin with and get rid of React ;)
[15:46:38] Mosselman: Ping timeout: 276 seconds
[16:09:38] Mosselman: has joined #ruby
[16:09:38] Mosselman: has joined #RubyOnRails
[16:14:18] Mosselman: Ping timeout: 268 seconds

2015-05-24

[05:43:37] Mosselman: has joined #RubyOnRails

2015-05-21

[07:55:23] Mosselman: has joined #RubyOnRails

2015-04-30

[10:41:17] Mosselman: I am playing with websockets and faye. I have an issue though. As you can see here: https://github.com/faye/faye-websocket-ruby#websocket-api
[10:42:03] Mosselman: I can create a client `ws = Faye::Client.new...` and then call `ws.send('message')` to send a message... But I get the error: undefined method `message' for #<Faye::Client:0x0000010f3d3578>
[10:42:15] Mosselman: which is somewhat logical since I am using 'send'
[10:42:31] Mosselman: But how else can I send a message or call the correct method?
[10:51:17] Mosselman: Ok I figured it out. I turns out I was using one of the many other gems. Which makes sense as websocket gems, etc. are aplenty

2015-04-20

[13:55:36] Mosselman: I have a quick question: I have a model 'record' with more than one association. I want to destroy the record unless any one of the associations prevents it to be destroyed. How can I check this? I was thinking along the lines of record.destroyable?
[13:55:48] Mosselman: But that does not exist ;)
[14:02:47] Mosselman: balr0g: but what if I don't want to destroy? I just want to know whether I can.
[14:03:03] Mosselman: hence `record.destroyable?`
[14:05:30] Mosselman: balr0g: Well I now ended up manually checking if there are for example comments: record.comments.any?, but that is very specific. I think there is no 'easier' solution though.
[14:05:46] Mosselman: `destroyable?` would've been nicer for me in this case
[14:07:55] Mosselman: balr0g: thanks for thinking with me though :)

2015-01-12

[10:03:05] Mosselman: I have a question. Does anyone have any experience in auto-scaling Heroku web and worker dynos? I have looked at an add-on, namely 'Adept Scale' and a gem to go into my app called 'hirefire'.
[10:03:13] Mosselman: I am wondering if anyone has any experiences.
[10:03:26] Mosselman: How is everything mikecmpbll?
[10:08:37] Mosselman: mikecmpbll: good too thanks :), enjoying setting up jobs and such on heroku
[10:09:15] Mosselman: elaptics: I want to automatically increase the workers on Heroku when I have more than X jobs scheduled and scale back down to 1 when there are less than X
[10:12:28] Mosselman: universa1: I know, what I am asking is if anyone has good/bad experiences with some of them and what they'd recommend
[10:40:46] Mosselman: No takers on the Heroku scaling thing?
[11:03:24] Mosselman: Haha universa1 yeah!
[11:08:08] Mosselman: workmad3: I am aware that there are some gems. I mentioned this in my question. I was just wondering if anyone has had any good experience with any of them.
[11:08:25] Mosselman: So basically the answer is no :), which is fine too.

2014-09-27

[18:18:46] Mosselman: Hi guys. I have a question. I am setting up postgres and suddenly remembered something. Isn't it so that I can give the user running my rails server permission on the db and have rails connect through that user?
[18:18:56] Mosselman: In my example that use could be called 'deployer'?
[18:19:06] Mosselman: What I mean is that I don't need to create a password for that user.

2014-09-26

[18:20:45] Mosselman: What do you mean codesoda?
[18:20:56] Mosselman: What would be the context?
[18:23:22] Mosselman: ckboii89: For mac: http://apple.stackexchange.com/questions/146849/how-do-i-recompile-bash-to-avoid-shellshock-the-remote-exploit-cve-2014-6271-an
[18:23:57] Mosselman: codesoda: what would be the benefit of these sub factories over normal traits?
[18:26:05] Mosselman: codesoda: You can create a new factory and name it lets say "my_special_factory" like so: factory :special_user, class: User
[18:26:32] Mosselman: then you do FactoryGirl.create :special_user
[18:26:39] Mosselman: and you can build it with anything you like
[18:28:16] Mosselman: codesoda: I believe that was the answer?
[18:29:28] Mosselman: codesoda: so in your example that could be factory :closed_high_priority_bug_report, class: BugReport
[18:36:57] Mosselman: codesoda: Is that not possible?
[18:38:21] Mosselman: codesoda: how about defining methods?
[18:38:27] Mosselman: to get the properties from?
[18:47:12] Mosselman: rhizome: the problem was that he'd have to type all the traits he wants every time. He'd like to define all the traits in one place and then have shortcuts to implement those. So create :close_prio_bug_report
[18:47:32] Mosselman: shortcuts for a model with a specific set of traits
[18:48:55] Mosselman: Can't you call traits from other traits?
[19:07:40] Mosselman: rhizome: the underscore were of my poor design. I can imagine that sometimes it would be useful. But instead of a 'sub' factory I'd try to call traits from others. factory.create :user, :manager which would in turn call the traits :registered, :vault_key, :anual_bonus
[19:12:44] Mosselman: I am out for tonight.
[19:12:46] Mosselman: Good night all
[20:15:39] Mosselman: Ok so I have a fairly specific question for you all. I am using the gem 'phony' for parsing phone numbers. Now I thought it should be fairly trivial to have it return an array of all of its country codes, but I can't really seem to find out how.
[20:15:52] Mosselman: https://github.com/floere/phony
[20:16:17] Mosselman: momomomomo: sounds very reasonable thanks
[20:16:41] Mosselman: Is there a general place where I could find such a thing? Or do all gems by definition have one?
[20:17:44] Mosselman: mikecmpbll: yep
[20:18:26] Mosselman: Yes that was what I was trying to do.
[20:19:29] Mosselman: mikecmpbll: I was throwing things at it through pry console, should've jumped to the code straight away.
[20:19:37] Mosselman: Looks like I 'cracked' it ;)
[20:19:45] Mosselman: Sorry for my noobishness and thanks for reminding me mikecmpbll
[20:22:31] Mosselman: mikecmpbll: I should know better than trying to do things this late after not sleeping a lot
[20:26:58] Mosselman: mikecmpbll: I thought it would too, but I get back a Hash of length 3
[20:29:02] Mosselman: mikecmpbll: I think I figured it out. It splits countries up in that hash according to the length of the country identifiers. e.g. 1 => us, 2 => greece, netherlands, etc

2014-09-25

[08:50:40] Mosselman: Top of the mornin'

2014-09-24

[09:59:34] Mosselman: It appears that by default the verifying isn't done
[09:59:37] Mosselman: let me reconnect
[10:00:52] Mosselman: workmad3: hmm, how can I now check that I am connected through SSL ?
[10:01:15] Mosselman: workmad3: :)
[10:01:23] Mosselman: Lets just start working then
[10:01:37] Mosselman: thanks for the tips workmad3 and rvanlieshout
[10:10:11] Mosselman: rvanlieshout: how about self.email.downcase!
[10:27:01] Mosselman: Radar: when was 4.1.6 released? Website still says that 4.1.5 is the latest version
[12:34:19] Mosselman: dANO: table?
[12:35:01] Mosselman: dANO: also, what do you mean you call in your app?
[12:36:35] Mosselman: dANO: is there json data in it by any chance?
[12:36:59] Mosselman: dANO: then I'd set that as a data attribute on something so that you can load it on first load
[12:37:15] Mosselman: dANO: then to update I'd use an ajax call to fetch the json directly
[12:37:56] Mosselman: loading js files for json data is a nono and not needed at all
[12:39:44] Mosselman: dANO: the reason it is a nono is that your javascript will get precompiled when deploying, so there is no way to get dynamic data in there
[12:41:23] Mosselman: dANO: not really
[12:41:54] Mosselman: dANO: You do something along the lines of: `<div id='product' data-meta-data=@product.to_json>`
[12:42:13] Mosselman: I am not sure if you need to do 'to_json'
[12:43:17] Mosselman: Then with jquery you could do: `$('#product').data('meta-data')` to get the data back
[12:44:07] Mosselman: dANO: then to update the data you do: `$.ajax(url: '/products/1.json'...etc)`
[12:44:20] Mosselman: dANO: which means you'd need a json view
[12:44:34] Mosselman: dANO: glad I could help
[12:45:09] Mosselman: dANO: I recommend you use jbuilder, it gives you great control over what your json will look like and contain
[12:46:08] Mosselman: dANO: yes sure
[12:46:50] Mosselman: dANO: You mean that that was your original question? Or a new question? :P
[12:48:43] Mosselman: I think you can even render your jbuilder template inside your data attributes dANO
[12:51:50] Mosselman: krainboltgreene: slow as in?
[12:54:35] Mosselman: krainboltgreene: yes makes sense, but 10x is still quite a hit
[12:55:33] Mosselman: I have no idea how it is setup now, but maybe the time-zone calculations, etc are not cached yet for a single action. So that some calculations are repeated or something
[12:57:00] Mosselman: would that by any chance be different from other adapters?
[13:01:51] Mosselman: Criten: yes
[13:02:02] Mosselman: Criten: I am pretty sure specific > wildcard
[13:27:33] Mosselman: axilla: User.all { |u| u.touch }
[13:27:42] Mosselman: axilla: but I am not sure this is the most efficient way
[13:28:14] Mosselman: alternatively: users.update_all({updated_at: Time.now})
[13:30:09] Mosselman: rvanlieshout: not sure, I was answering axilla's question
[13:30:20] Mosselman: but that would be worth taking into consideration
[13:30:56] Mosselman: rvanlieshout: yep that is a lot nicer, but I agree, update_all is a lot faster
[13:35:07] Mosselman: axilla: cool
[13:41:09] Mosselman: rvanlieshout: but having touch: true on the relation would trigger the touches one-by-one right? So if you don't need the touch callback on the user you'd be better off creating a after_update callback on the role that does role.users.update_all... ?
[13:41:49] Mosselman: oh never mind, just saw that it wouldn't even work here
[13:41:54] Mosselman: That is probably why ;)
[13:42:11] Mosselman: axilla: to pop the cache is updated_at enough?
[13:43:17] Mosselman: axilla: cool good to know, I should look at experimenting with caching some more
[13:44:37] Mosselman: axilla: better than getting stuck at the conceptual level
[13:47:34] Mosselman: tbuehlmann: what is the difference?
[13:48:52] Mosselman: thanks tbuehlmann
[13:48:58] Mosselman: for pointing that out
[13:49:56] Mosselman: so I have a question of my own. I am writing a migration and removing a t.references and I want it to be reversible. This means that I have to indicate a type. But when I write `:integer` as a type it does not create an index when rolling back
[13:50:43] Mosselman: tbuehlmann: thanks for the link
[13:51:08] Mosselman: axilla: yeah IRC is good fun
[13:53:34] Mosselman: New heroku dashboard is very awesome btw
[13:54:05] Mosselman: rsl: you raise an interesting point. How could be best test this?
[13:56:00] Mosselman: rvanlieshout: I didn't really mean automated test, just a test to find out so we can answer this question for ourselves.
[14:03:01] Mosselman: rvanlieshout: same
[14:03:30] Mosselman: An unrelated question: Would it make sense to create an index for a boolean column in a migration?
[14:05:27] Mosselman: mikecmpbll: isn't the timezone saved along with the datetime?
[14:06:16] Mosselman: So what is the 'CDT -05:00' good for at the end of a date? (for example)
[14:07:22] Mosselman: And it is stored in '-+00:00' ?
[14:07:36] Mosselman: pontiki: ^^
[14:09:45] Mosselman: So what would the main issue be then? If it always gets stored as UTC
[14:13:00] Mosselman: I am not having a problem with the time zones :)
[14:13:53] Mosselman: mikecmpbll: No I'd expect the time to be stored as basic as possible and then to translate through models/etc for the user. Right?
[14:14:44] Mosselman: mikecmpbll: I might be ;)
[14:16:13] Mosselman: rsl: You'd have to clearly indicate that though
[14:16:31] Mosselman: rsl: assumption is the mother of dissappointment
[14:17:39] Mosselman: rsl: If I plan a meeting in my home city at 14:00 then get on a plane and fly to somewhere where it is 5 hours later and then check my phone the meeting still has to be at 14:00
[14:17:50] Mosselman: It depends on what I am doing
[14:18:03] Mosselman: I might not have the meeting on my holiday
[14:18:08] Mosselman: but when I get back home
[14:18:31] Mosselman: I get called by my lawyer 'hey when was that meeting?' me: 'let me check... aah at 14:00'
[14:18:54] Mosselman: him "okay cool, have a nice flight back to our time zone'
[14:19:10] Mosselman: rsl that is what I meant. It may change, but it has to be clearly indicated that it did.
[14:19:27] Mosselman: but you said 'no, that is how those things work'
[14:20:00] Mosselman: I am saying my phone should not automatically change display times without telling me.
[14:20:04] Mosselman: You should it should.
[14:20:14] Mosselman: pontiki: it is :P
[14:20:49] Mosselman: rsl oh really? thank you cpt.
[14:21:09] Mosselman: What I am saying is that if I look at my phone I don't want it to 'move' with me without telling me.
[14:21:30] Mosselman: pontiki: exactly
[14:21:49] Mosselman: rsl: I am not saying the hours should change. I am saying your view of the time shouldn't
[14:22:10] Mosselman: So when I travel, if my phone decides to change time along with me, it should clearly say it changed.
[14:22:32] Mosselman: It is what I was talking about
[14:22:41] Mosselman: 16:16 < rsl> Mosselman: no it's how most things work.
[14:22:41] Mosselman: Mosselman> rsl: You'd have to clearly indicate that though
[14:24:42] Mosselman: Ok. lets say I build a calendar, it should change, but the time should be displayed like so: 14:00 (05:00 local time) or something of the sort. Since I planned the event before I got here
[14:24:59] Mosselman: rsl: I think so too yes :)
[14:26:34] Mosselman: pontiki: yes or at least noticing when users change so that they aren't suddenly expected to recalculate their time zone difference
[14:50:54] Mosselman: "My MacBook has gone to sleep." that is why you should run your IRC client inside a screen on a raspberrypi... maybe
[14:51:39] Mosselman: workmad3: less fun
[14:59:11] Mosselman: See you all later guys
[18:16:32] Mosselman: Hi guys, I have installed minitest and succesfully run model tests and integration tests, but when I include a 'describe' block in my controller tests it says: NameError: Unable to resolve controller for ...
[18:16:52] Mosselman: It is a nested controller btw, Api::V1::ApiController
[18:18:47] Mosselman: the directories are nested like that
[18:18:52] Mosselman: weaksauce: ^^
[18:19:10] Mosselman: not yet, sorry missed that part
[18:19:11] Mosselman: let me check
[18:19:58] Mosselman: weaksauce: yep that was it, thanks :)
[18:20:13] Mosselman: I didn't know the 'describe' blocks had a functional purpose like that
[18:20:20] Mosselman: I thought they were just semantic
[18:23:56] Mosselman: Does anyone have any experience with gems for parsing phone numbers?
[18:24:02] Mosselman: My research has lead to 3 options
[18:24:16] Mosselman: phony, phone and global_phone
[18:24:59] Mosselman: The latter having the advantage of using an external (Google's) phone number specification, but I have no idea whether it actually delivers on its promises
[18:29:30] Mosselman: Vox on Mac caiden
[18:29:35] Mosselman: thanks for the heads up momomomomo
[18:32:35] Mosselman: caiden: it most certainly does
[18:32:40] Mosselman: caiden: player is very very good though
[18:32:44] Mosselman: I like it anyway