« Back to channel list

#RubyOnRails - 20 December 2018

« Back 1 day Forward 1 day »
[00:00:26] Arkantos: has joined #RubyOnRails
[00:01:55] Arkantos: has joined #RubyOnRails
[00:03:19] Arkantos: has joined #RubyOnRails
[00:04:48] Arkantos: has joined #RubyOnRails
[00:18:57] blackmesa: has joined #RubyOnRails
[00:25:12] cnsvc_: has joined #RubyOnRails
[00:54:21] kapil____: has joined #RubyOnRails
[00:58:18] Exuma: has joined #RubyOnRails
[01:00:16] orbyt_: has joined #RubyOnRails
[01:09:51] blackmesa: has joined #RubyOnRails
[01:10:44] Exuma: has joined #RubyOnRails
[01:17:20] IGnorAND: I have a list of companies with employees. I'm trying to run a to_xml, but which shows employee details per company. It seems my to_xml seems to run a select * from employees where company = 'next id' for every company. This seems to take a while. Is there a faster way to do this?
[01:18:34] Exuma: has joined #RubyOnRails
[01:21:15] Arkantos: has joined #RubyOnRails
[01:23:27] lupine: Company.includes(:employees).all or so
[01:23:57] lupine: but you'd best not be writing software for recruiters
[01:24:02] lupine: that is truly of the devil
[01:40:12] cnsvc_: has joined #RubyOnRails
[01:44:18] havenwood: IGnorAND: Also, use indexes if you aren't already and make sure it's near 100% cache hit rate.
[01:48:01] sevenseacat: has joined #RubyOnRails
[01:55:06] pekalicious: has joined #RubyOnRails
[02:01:40] pekalicious: Hello! I have a list or URLS in an array and another list with regex rules. The idea is to filter out the first list according to the rules of the second. (I.e. a rule could be "anything from youtube should be rejected"). Is there a way to do this without using nested loops? Thanks.
[02:07:23] havenwood: pekalicious: urls.grep Regexp.union regex_rules
[02:07:51] cnsvc_: has joined #RubyOnRails
[02:09:44] pekalicious: that looks awesome. will look into it. thanks.
[02:09:46] havenwood: %w[foo bar baz].grep Regexp.union [/fo/, /z/] #=> ["foo", "baz"]
[02:09:51] havenwood: pekalicious: you're welcome
[02:10:54] havenwood: pekalicious: Ah, you said "filter out" not "fillter."
[02:11:06] havenwood: pekalicious: Just change #grep to #grep_v
[02:11:13] havenwood: pekalicious: urls.grep_v Regexp.union regex_rules
[02:11:51] havenwood: %w[foo bar baz].grep_v Regexp.union [/fo/, /z/] #=> ["bar"]
[02:20:26] Exuma: has joined #RubyOnRails
[02:23:31] pekalicious: Something a little similar. After I filter the list I want to run different transform algorithms based on the url. For example, for reddit URLS I want to run ExtractRedditCommentsLink, for Lobsters ExtractLobstersCommentList and for the rest leave them alone. I have a list of mapping RegexUrlRule => TransformAlgorithm. How would I go about that?
[02:25:09] cnsvc_: has joined #RubyOnRails
[02:27:49] EminenceHC: has joined #RubyOnRails
[02:35:33] Arkantos: has joined #RubyOnRails
[02:54:28] Exuma: has joined #RubyOnRails
[03:22:42] gambl0r3: has joined #RubyOnRails
[03:46:43] Jervis_: has joined #RubyOnRails
[03:58:20] Exuma: has joined #RubyOnRails
[04:09:33] braincrash: has joined #RubyOnRails
[04:16:21] cnsvc_: has joined #RubyOnRails
[04:19:51] roshanavand: has joined #RubyOnRails
[04:36:16] cnsvc_: has joined #RubyOnRails
[04:51:54] Exuma: has joined #RubyOnRails
[05:03:36] uks: has joined #RubyOnRails
[05:07:54] roshanavand: has joined #RubyOnRails
[05:33:30] roshanavand: has joined #RubyOnRails
[05:35:23] paranoicsan: has joined #RubyOnRails
[05:55:26] quazimodo: has joined #RubyOnRails
[06:05:49] quazimodo: has joined #RubyOnRails
[06:30:46] roshanavand: has joined #RubyOnRails
[06:37:36] quazimodo: has joined #RubyOnRails
[06:40:06] endemic: has joined #RubyOnRails
[06:58:57] za1b1tsu: has joined #RubyOnRails
[07:12:38] kapil____: has joined #RubyOnRails
[07:14:15] dionysus69: is it possible to use multiple select like checkbox? so it includes unselected as 0s in the submitted params
[07:40:12] conta: has joined #RubyOnRails
[07:40:24] srinidhi: has joined #RubyOnRails
[07:44:15] srinidhi: has joined #RubyOnRails
[07:56:14] blackmesa: has joined #RubyOnRails
[07:59:42] cnsvc_: has joined #RubyOnRails
[08:20:24] quazimodo: has joined #RubyOnRails
[08:21:46] dviola: has joined #RubyOnRails
[08:29:09] quazimodo: has joined #RubyOnRails
[08:38:27] srinidhi: has joined #RubyOnRails
[09:09:51] mikecmpbll: has joined #RubyOnRails
[09:10:14] powerbit: has joined #RubyOnRails
[09:10:23] uksio: has joined #RubyOnRails
[09:12:38] paranoicsan: has joined #RubyOnRails
[09:15:23] cnsvc_: has joined #RubyOnRails
[09:16:26] powerbit: has joined #RubyOnRails
[09:18:07] dionysus69: has joined #RubyOnRails
[09:36:25] kidPalooma: has joined #RubyOnRails
[09:37:59] kidPalooma: Hello, I'm a bit confused on devise gem's 'remember me' feature. I can't find any updated documentation on how to add it to my project and I'm confused about what is default behavior and what needs to be implemented. Can you point me to any examples or tutorials?
[09:40:47] jhass: https://stackoverflow.com/a/11810594/2199687
[09:41:08] jhass: okay wait the comments say it's not working :D
[09:42:07] jhass: but something along those lines
[09:43:08] Guest49234: has joined #RubyOnRails
[09:44:28] kidPalooma: jhass: I want to be sure because I am not entirely confident on how to test if this thing works, so I want to go by the manual (which is nowhere to be seen)
[09:44:56] kidPalooma: jhass: I'm trying that solution, thx
[09:44:58] jhass: it's easy to test, if you close your browser now and open it again you should be signed out
[09:45:08] jhass: if you add it and do the same test again you should still be signed in
[09:46:12] jhass: https://www.rubydoc.info/github/plataformatec/devise/Devise/Models/Rememberable there are some options too
[09:48:23] jhass: you can also check the database on whether the field gets updated I guess
[09:48:28] kidPalooma_: has joined #RubyOnRails
[09:48:44] kidPalooma_: re, bad connection
[09:49:17] helpa: http://logs.ryanbigg.com/
[09:53:22] cnsvc_: has joined #RubyOnRails
[10:00:23] IGnorAND: lupine: what does 'that is truely of the devil' mean?
[10:01:09] jottr: has joined #RubyOnRails
[10:02:27] IGnorAND: havenwood: I'll check the indexes.
[10:07:24] IGnorAND: lupine: the includes makes it 6.5 times faster
[10:08:36] kidPalooma_: ok, that worked, thanks a bunch jhass
[10:20:40] Ergo: has joined #RubyOnRails
[10:30:10] srinidhi: has joined #RubyOnRails
[10:32:52] mikecmpb_: has joined #RubyOnRails
[10:39:37] Exagone313: has joined #RubyOnRails
[10:45:45] paranoicsan: has joined #RubyOnRails
[10:54:48] guyz: has joined #RubyOnRails
[11:18:46] mikecmpbll: has joined #RubyOnRails
[11:54:41] paranoicsan: has joined #RubyOnRails
[11:55:29] ariedler: has joined #RubyOnRails
[12:00:36] lypsis: has joined #RubyOnRails
[12:06:55] lypsis: has joined #RubyOnRails
[12:15:35] lypsis: has joined #RubyOnRails
[12:17:03] lypsis: has joined #RubyOnRails
[12:34:53] Guest49234: has joined #RubyOnRails
[12:36:11] Sylario: has joined #RubyOnRails
[12:41:19] cnsvc_: has joined #RubyOnRails
[12:55:57] Guest49234: has joined #RubyOnRails
[12:57:30] mostlybadfly: has joined #RubyOnRails
[13:15:49] roshanavand: has joined #RubyOnRails
[13:29:04] dslegends: has joined #RubyOnRails
[13:37:15] EminenceHC: has joined #RubyOnRails
[13:47:15] Guest49234: has joined #RubyOnRails
[14:04:12] alan_w: has joined #RubyOnRails
[14:14:42] regedit: has joined #RubyOnRails
[14:24:04] paranoicsan: has joined #RubyOnRails
[14:27:19] Guest49234: has joined #RubyOnRails
[14:32:55] reber: has joined #RubyOnRails
[14:39:53] ellcs: has joined #RubyOnRails
[14:42:25] jgpawletko: has joined #RubyOnRails
[14:46:23] krawchyk: has joined #RubyOnRails
[15:15:37] armyriad: has joined #RubyOnRails
[15:45:34] tjmcginnis: has joined #RubyOnRails
[15:47:14] lexileo: has joined #RubyOnRails
[15:47:16] jsc: has joined #RubyOnRails
[15:50:41] mustmodify: has joined #RubyOnRails
[15:54:00] mustmodify: Good morning. I'm having an issue in production affecting 50 - 100 full time users. The Rails site I maintain runs in production for months without issues (but with frequent deploys.) Last night I restarted the server after changing a MySQL config. (Yes, that wasn't strictly necessary.) Site continued to run until 10am eastern. Then it 504'd all requests. Process was still running. I killed it. It restarted. 10 minutes later
[15:54:27] mustmodify: Nothing interesting in /production.log or the upstart log.
[15:54:45] krawchyk: has joined #RubyOnRails
[15:55:03] mustmodify: So at this point I'm looking for dots to try to connect. Any thoughts?
[16:01:28] krawchyk_: has joined #RubyOnRails
[16:08:01] status402: has joined #RubyOnRails
[16:21:33] krawchyk: has joined #RubyOnRails
[16:28:14] Guest49234: has joined #RubyOnRails
[16:30:36] conta: has joined #RubyOnRails
[17:04:32] srinidhi: has joined #RubyOnRails
[17:13:49] epochwolf: has joined #RubyOnRails
[17:18:39] cnsvc_: has joined #RubyOnRails
[17:21:52] Guest49234: has joined #RubyOnRails
[17:30:35] planigan: has joined #RubyOnRails
[17:40:30] raunicolae: has joined #RubyOnRails
[17:52:54] Ergo: has joined #RubyOnRails
[18:04:05] Saukk: has joined #RubyOnRails
[18:05:49] amperry: has joined #RubyOnRails
[18:11:02] amperry: hi folks, if I want two separate levels of access to a model (admin and regular), is there anything funky about having two controllers, one under /app/controllers and one under /app/controllers/admin?
[18:19:31] orbyt_: has joined #RubyOnRails
[18:19:54] mikecmpbll: has joined #RubyOnRails
[18:20:35] cnsvc_: has joined #RubyOnRails
[18:20:46] Exuma: has joined #RubyOnRails
[18:32:44] amperry: ne'ermind, I just decided to test it, and it all looks good
[18:33:31] darkhanb: has joined #RubyOnRails
[18:46:10] mostlybadfly: has joined #RubyOnRails
[19:06:24] sirensari2: has joined #RubyOnRails
[19:22:08] Dbugger: has joined #RubyOnRails
[19:22:37] samort7: has joined #RubyOnRails
[19:22:39] SteenJobs: has joined #RubyOnRails
[19:25:32] za1b1tsu: has joined #RubyOnRails
[19:36:00] gambl0r3: has joined #RubyOnRails
[19:36:15] conta: has joined #RubyOnRails
[19:39:32] Arkantos: has joined #RubyOnRails
[19:59:57] Arkantos: has joined #RubyOnRails
[20:05:03] dslegends: has joined #RubyOnRails
[20:14:54] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[20:37:05] c001os: has joined #RubyOnRails
[20:37:33] lxsameer: has joined #RubyOnRails
[20:45:03] orbyt_: has joined #RubyOnRails
[20:55:46] fcser_: has joined #RubyOnRails
[21:06:11] roshanavand: has joined #RubyOnRails
[21:26:01] hahuang6-: has joined #RubyOnRails
[21:31:19] elcontrastador: has joined #RubyOnRails
[22:03:46] agent_white: has joined #RubyOnRails
[22:17:12] defsdoor: has joined #RubyOnRails
[22:26:32] sirensari2: has joined #RubyOnRails
[22:35:43] jottr: has joined #RubyOnRails
[22:53:11] sirensari2: has joined #RubyOnRails
[23:06:34] jottr: has joined #RubyOnRails
[23:18:20] ellcs: has joined #RubyOnRails
[23:43:39] segy: has joined #RubyOnRails
[23:56:16] jottr: has joined #RubyOnRails