« Back to channel list

#RubyOnRails - 26 October 2017

« Back 1 day Forward 1 day »
[00:00:39] jrabe: has joined #RubyOnRails
[00:04:00] guacamole: has joined #RubyOnRails
[00:07:23] xaviergmail: has joined #RubyOnRails
[00:07:58] provokeme: has joined #RubyOnRails
[00:11:11] workmad3: has joined #RubyOnRails
[00:16:59] agent_white: has joined #RubyOnRails
[00:19:23] provokeme: has joined #RubyOnRails
[00:22:34] dviola: has joined #RubyOnRails
[00:26:27] guacamole: has joined #RubyOnRails
[00:31:30] jphase: has joined #RubyOnRails
[00:42:24] lethjakman: has joined #RubyOnRails
[00:45:57] Kilo`byte: how can i get a callback run whenever i save a certain model?
[00:48:53] guacamole: has joined #RubyOnRails
[01:03:45] guacamole: has joined #RubyOnRails
[01:18:29] guacamole: has joined #RubyOnRails
[01:23:38] irishfromua: has joined #RubyOnRails
[01:24:20] quazimodo: has joined #RubyOnRails
[01:34:53] Technodrome: has joined #RubyOnRails
[02:07:16] guacamole: has joined #RubyOnRails
[02:09:32] mitt3ns: has joined #RubyOnRails
[02:12:00] workmad3: has joined #RubyOnRails
[02:13:27] agent_white: has joined #RubyOnRails
[02:21:54] mcr1: has joined #RubyOnRails
[02:23:04] jphase: has joined #RubyOnRails
[02:31:31] orbyt_: has joined #RubyOnRails
[02:32:06] Technodrome: has joined #RubyOnRails
[02:39:45] lethjakman: has joined #RubyOnRails
[02:50:18] weaksauce: has joined #RubyOnRails
[03:00:47] moei: has joined #RubyOnRails
[03:03:04] kapil___: has joined #RubyOnRails
[03:19:22] Saukk: has joined #RubyOnRails
[03:32:00] jphase: has joined #RubyOnRails
[03:58:07] Technodrome: has joined #RubyOnRails
[04:12:55] workmad3: has joined #RubyOnRails
[04:29:01] rgr_: has joined #RubyOnRails
[04:37:04] lethjakman: has joined #RubyOnRails
[05:01:13] conta: has joined #RubyOnRails
[05:01:44] agent_white: has joined #RubyOnRails
[05:07:55] uks: has joined #RubyOnRails
[05:15:54] guacamole: has joined #RubyOnRails
[05:28:47] pwnd_nsfw: has joined #RubyOnRails
[06:11:02] snickers: has joined #RubyOnRails
[06:13:44] workmad3: has joined #RubyOnRails
[06:18:21] gr33nw00d: has joined #RubyOnRails
[06:18:28] gr33nw00d: How do I pass my concern a config that can be unique on a per-model basis?
[06:27:42] dionysus69: has joined #RubyOnRails
[06:29:51] conta: has joined #RubyOnRails
[06:37:02] Hexafox[I]: has joined #RubyOnRails
[06:42:10] Hexafox[I]: has joined #RubyOnRails
[06:47:32] Hexafox[I]: has joined #RubyOnRails
[06:52:40] Hexafox[I]: has joined #RubyOnRails
[06:56:48] ynonp: has joined #RubyOnRails
[07:05:11] quazimodo: has joined #RubyOnRails
[07:08:01] universa1: has joined #RubyOnRails
[07:24:49] snickers: has joined #RubyOnRails
[07:50:18] FastJack: has joined #RubyOnRails
[07:55:10] fcser__: has joined #RubyOnRails
[07:56:53] uksio: has joined #RubyOnRails
[07:59:42] marr: has joined #RubyOnRails
[08:00:44] Illianthe: has joined #RubyOnRails
[08:03:59] ynonp: has joined #RubyOnRails
[08:13:09] snickers: has joined #RubyOnRails
[08:14:32] workmad3: has joined #RubyOnRails
[08:15:11] mikecmpbll: has joined #RubyOnRails
[08:20:10] oquidave: has joined #RubyOnRails
[08:25:21] oquidave: hello, am getting an error "NoMethodError (undefined method `to_datetime' for -Infinity:Float):" on my ruby on rails 4.0 app https://dpaste.de/nQqC am not sure what to do now . Any help? Thanks
[08:27:24] tbuehlmann: oquidave: looks like you're calling to_datetime on -infinity
[08:37:38] oquidave: tbuehlmann: what does it mean? this is application which is working perfectly fine on Ubuntu 14.04 server. I just migrated it to another server Ubuntu 16.06 but with the same rails version.
[08:37:53] ynonp: has joined #RubyOnRails
[08:41:52] ams__: has joined #RubyOnRails
[08:42:49] lxsameer: has joined #RubyOnRails
[08:46:33] arBmind: has joined #RubyOnRails
[08:56:01] oquidave: Hello, how can I rewrite this query for rails 5 >> Domain.find(:all, :conditions => ['name LIKE? || admin_firstname LIKE? || admin_email LIKE?', "%#{search}%", "%#{search}%", "%#{search}%"]) . It works with rails 4.0.3
[09:14:52] Sylario: Considering an REST API that will be consumed by an ember app. I have a product, that belongs_to licence. When I want the products of a licence, is it convention to use this route : /products/?licence_id=:id ?
[09:29:13] jottr: has joined #RubyOnRails
[09:30:26] tbuehlmann: sylario: that or /licences/id/products or /products?filter[licence_id]=:id or /products?filter[licence]=:id
[09:32:56] workmad3: has joined #RubyOnRails
[09:35:50] Hexafox[I]: has joined #RubyOnRails
[09:48:19] Hexafox[I]: has joined #RubyOnRails
[09:53:35] Hexafox[I]: has joined #RubyOnRails
[09:53:44] marr: has joined #RubyOnRails
[09:53:51] Ergo: has joined #RubyOnRails
[10:03:26] FastJack: has joined #RubyOnRails
[10:10:23] markzen: has joined #RubyOnRails
[10:11:27] markzen: anyone knows how to unban an ip from rack attack?
[10:12:39] alexday: has joined #RubyOnRails
[10:14:49] alexday: I wanted to ask about a deployment thing. We have a sidekiq.yml with priorities set. But the problem is the one with higher priority has so much load that sometimes the 4 boxes go down. One solution is to manually change the sidekiq.yml in some boxes to process only the highest priority queue. but that is a manual thing. automating that is difficult. Is there any solution to this problem less hacky
[10:23:08] mtkd: has joined #RubyOnRails
[10:31:39] Ergo: has joined #RubyOnRails
[10:32:36] jottr: has joined #RubyOnRails
[10:49:54] jphase: has joined #RubyOnRails
[10:50:44] Exagone313: has joined #RubyOnRails
[11:02:22] arBmind: has joined #RubyOnRails
[11:03:01] noob_on_rails: has joined #RubyOnRails
[11:03:04] blackmesa: has joined #RubyOnRails
[11:03:10] noob_on_rails: hey all! is there a way to read the resulting DOM ?
[11:03:29] noob_on_rails: inside the code and search for something ?
[11:07:28] quazimodo: has joined #RubyOnRails
[11:18:42] morfin: has joined #RubyOnRails
[11:19:36] morfin: i need to share some parts of code - as example ActiveRecord models so i moved into my own gem. I should require every model now in Rails app?
[12:08:24] mcr1: has joined #RubyOnRails
[12:09:46] srinidhi: has joined #RubyOnRails
[12:10:01] jottr: has joined #RubyOnRails
[12:29:13] markzen: has left #RubyOnRails: ("WeeChat 1.9.1")
[12:30:02] keegnotrub: has joined #RubyOnRails
[12:34:10] morfin: seems like it's impossible?
[12:42:22] jphase: has joined #RubyOnRails
[12:48:46] alfiemax: has joined #RubyOnRails
[13:03:33] apparition: has joined #RubyOnRails
[13:35:38] GodFather: has joined #RubyOnRails
[13:41:54] blackmesa: has joined #RubyOnRails
[14:12:34] robnester: has joined #RubyOnRails
[14:12:38] arBmind: has joined #RubyOnRails
[14:12:54] Technodrome: has joined #RubyOnRails
[14:13:40] chouhoulis: has joined #RubyOnRails
[14:28:18] jphase: has joined #RubyOnRails
[14:31:33] mauro1254: has joined #RubyOnRails
[14:32:02] ResidentBiscuit: has joined #RubyOnRails
[14:33:25] mauro1254: Hi folks, how can I set default_url_options[:host] in a thread safe mode for ActionMailer::Base when it depends on the request?
[14:33:53] snickers: has joined #RubyOnRails
[14:37:07] gr33nw00d: has joined #RubyOnRails
[14:37:33] gr33nw00d: Are there any recommended gems for reducing boilerplate when enabling query parameters for filtering endpoints on a Rails 5 API?
[14:50:16] Technodrome: has joined #RubyOnRails
[14:53:40] DrYockel: has joined #RubyOnRails
[14:54:46] brendan-: has joined #RubyOnRails
[14:55:17] Papierkorb: has joined #RubyOnRails
[14:55:55] tcopeland1: has joined #RubyOnRails
[14:58:23] mauro1254: https://coderwall.com/p/hzdnca/action-mailer-host
[14:58:31] mauro1254: Is this the right way?
[15:07:30] ahrs: has joined #RubyOnRails
[15:09:12] guacamole: has joined #RubyOnRails
[15:10:51] dopie: has joined #RubyOnRails
[15:11:45] dopie: hey guys how can I fix this error?
[15:11:46] dopie: https://gist.github.com/staycreativedesign/ad701e4d327d0d38febe549b98c6135e
[15:17:49] alfiemax: has joined #RubyOnRails
[15:18:26] nogic: has joined #RubyOnRails
[15:22:12] orbyt_: has joined #RubyOnRails
[15:23:02] Papierkorb: has left #RubyOnRails: ("Konversation terminated!")
[15:31:37] blackmesa1: has joined #RubyOnRails
[15:35:55] JoshL: has joined #RubyOnRails
[15:38:16] mtkd: has joined #RubyOnRails
[15:50:13] kies: has joined #RubyOnRails
[15:50:39] alfiemax: has joined #RubyOnRails
[15:56:11] tbuehlmann: dopie: what's in line 34?
[15:56:43] zehbax: has joined #RubyOnRails
[15:58:01] troys: has joined #RubyOnRails
[16:08:59] dopie: expect { post :create, new_user_params }.to change { ActionMailer::Base.deliveries.count }.by(3)
[16:14:44] tcopeland: has joined #RubyOnRails
[16:17:45] dviola: has joined #RubyOnRails
[16:20:44] alfiemax: has joined #RubyOnRails
[16:21:24] dopie: expect { post :create, params: new_user_params }.to change { ActionMailer::Base.deliveries.count }.by(3)
[16:21:29] dopie: forgot params:
[16:24:35] orbyt_: has joined #RubyOnRails
[16:25:53] dionysus69: has joined #RubyOnRails
[16:26:20] conta: has joined #RubyOnRails
[16:29:13] jphase: has joined #RubyOnRails
[16:31:40] gusrub: has joined #RubyOnRails
[16:46:27] conta2: has joined #RubyOnRails
[16:57:22] snickers: has joined #RubyOnRails
[17:00:13] one_zero: has joined #RubyOnRails
[17:19:45] alfiemax: has joined #RubyOnRails
[17:22:37] Technodrome: has joined #RubyOnRails
[17:29:07] kies: has joined #RubyOnRails
[17:36:56] guacamole: has joined #RubyOnRails
[17:54:33] tanuki: has joined #RubyOnRails
[17:58:52] orbyt_: has joined #RubyOnRails
[18:08:12] dgsan: has joined #RubyOnRails
[18:09:04] Technodrome: has joined #RubyOnRails
[18:20:19] blackmesa1: has joined #RubyOnRails
[18:25:14] orbyt_: has joined #RubyOnRails
[18:33:32] blackmesa1: has joined #RubyOnRails
[18:38:49] dionysus69: has joined #RubyOnRails
[18:55:18] blackmesa1: has joined #RubyOnRails
[18:55:19] directhex: has joined #RubyOnRails
[18:55:42] directhex: has left #RubyOnRails: ()
[18:56:12] bruno-: has joined #RubyOnRails
[18:57:00] Fernando-Basso: has joined #RubyOnRails
[18:57:35] Technodrome: has joined #RubyOnRails
[19:05:21] blackmesa: has joined #RubyOnRails
[19:12:32] mcr1: has joined #RubyOnRails
[19:12:35] npgm: has joined #RubyOnRails
[19:13:41] EXCHGR: has joined #RubyOnRails
[19:17:18] stevednd: how can I get Time.iso8601 to treat a passed in string with no timezone as utc, and one with a timezone as being the offset of utc, and no matter what give me a utc time?
[19:18:21] mtkd: has joined #RubyOnRails
[19:24:13] Technodrome: has joined #RubyOnRails
[19:31:50] blackmesa1: has joined #RubyOnRails
[19:41:38] mtkd: has joined #RubyOnRails
[19:51:14] DrYockel: has joined #RubyOnRails
[20:01:01] tcopeland: I’m thinking of using this for a “must end in the future” validation - but I dunno, too much of a misuse of numericality? validates :ends_at, numericality: {greater_than: ->(x) { Time.now.to_i } }
[20:06:57] orbyt_: has joined #RubyOnRails
[20:17:25] arBmind: has joined #RubyOnRails
[20:17:27] dionysus69: has joined #RubyOnRails
[20:21:52] mostlybadfly: has joined #RubyOnRails
[20:29:47] uks: has joined #RubyOnRails
[20:31:12] Technodrome: has joined #RubyOnRails
[21:02:34] dminuoso: tcopeland: https://xkcd.com/1179/
[21:03:20] dminuoso: tcopeland: Most usable databases also happen to have native support for dates.
[21:04:28] tcopeland: oh yeah the underlying column type would still be a date, definitely… I’m just thinking of an easier way (vs a separate validation method) to validate that it’s in the future
[21:05:13] dminuoso: tcopeland: Pass as ISO 8601 string, parse it and use Date#<=> ?
[21:06:35] tcopeland: I wonder if it’d be worth adding a new class to ActiveModel::Validations that could do simple date before/after validations
[21:07:42] dminuoso: tcopeland: You mean something like validates :stamp, date: { in_the_past: true } ?
[21:07:52] tcopeland: yup exactly
[21:08:29] tcopeland: validates :timeishess
[21:08:32] dminuoso: tcopeland: As long as it validates iso 8601iness, why not.
[21:08:36] tcopeland: er, timeishness
[21:08:56] dminuoso: But please no more unix timestamps. :(
[21:09:35] tcopeland: ah yeah, those are unpleasant to work with for sure
[21:12:32] agent_white: has joined #RubyOnRails
[21:22:59] mtkd: has joined #RubyOnRails
[21:23:26] emers2n: has joined #RubyOnRails
[21:26:36] sagax: has joined #RubyOnRails
[21:42:50] mcr1: has joined #RubyOnRails
[21:44:27] kies: has joined #RubyOnRails
[21:47:54] snake38: has joined #RubyOnRails
[21:48:30] snake38: so I go to some interview for a programming position and the people who interviewed me said I can't use linux, that I have to use windows for development... ridiculous
[21:50:09] dminuoso: snake38: Im a bit unsure how that is ridiculous.
[21:50:15] dminuoso: If they have a windows environment, then that's what it is.
[21:52:57] snake38: dminuoso: yeah, but that's very much like hiring a plumber and telling him that instead of using real tools he has to use your son's fisher price toy as tools
[21:54:04] snake38: I understand where he is coming from, just saying it sucks
[21:54:34] dminuoso: snake38: Im quite unsure how that comparison makes sense, but it sounds like you are just angry that they don't use your favourite environment.
[21:54:46] snake38: honestly, I'd be fine if he allowed me to use a VM but that will be like an act of war
[21:55:43] alfie: snake38: my advice is to care slightly less if you can
[21:55:45] alfie: it's a job :P
[21:56:33] alfie: i just came from an environment I were we used fucking Oracle RDBMS on _desktop windows hosts_ for some stuff
[21:56:45] alfie: i won't name and shame because it's not fair to kick someone when they're already down
[21:56:45] dminuoso: And I thought Oracle was horrible enough.
[21:56:47] dminuoso: I feel sorry for you.
[21:57:03] orbyt_: has joined #RubyOnRails
[21:57:05] alfie: dminuoso: ... across the world via a VPN on a shoddy connection in an office with 98% uptime on the mains supply
[21:58:50] snake38: I see, thanks for your advice and sorry for the rant, I probably won't end up working forever there and I'm sure I'll end up learning some stuff, I guess I'll take the job
[21:59:25] alfie: snake38: yeah. sure, it sucks to work with what is frankly a garbage OS to develop on
[21:59:39] alfie: but... have you tried administrating desktop linux in an enterprise environment? :P
[21:59:58] alfie: ask for a mac if possible, otherwise suck it up and spend your free time contributing to linux OTD :P
[22:00:35] dminuoso: alfie: Considering the direction Apple has been taking, I'm not sure whether I want to keep my MBP.
[22:00:54] alfie: ACTION is about to buy a new one
[22:00:57] alfie: i considered that
[22:01:01] dminuoso: Though develoment on Windows can be quite fine.
[22:01:04] alfie: then looked at the rest of the laptop market
[22:01:09] alfie: and realised "oh god this all sucks, i'm sticking with apple"
[22:01:10] snake38: yes, well, they end up deploying on unix servers, why not use linux or some other unix as a desktop? it'll make things easier...
[22:01:39] alfie: snake38: yeah, it just makes... everything else harder, because microsoft have a chokehold on enterprise client administration
[22:01:53] alfie: macOS just about works to the point orgs are happy with
[22:01:55] alfie: but MS like breaking shit
[22:02:13] snake38: not to mention the ransomware attacks we are saying on windows, you have to be really clueless to go full microsoft on a corporate setting
[22:02:30] snake38: unless you love losing money
[22:02:31] alfie: you have to be really clueless to suggest using windows in a corporate setting is clueless, i'll say that much ;)
[22:02:47] alfie: i disagree with using windows generally
[22:03:05] nogic: has joined #RubyOnRails
[22:03:33] alfie: it's... bad, it's an absolute insult to those of us with accessibility requirements, but it's not fair to say it's an entirely lost cause when the linux community just haven't given us a decent mass-administration ecosystem for linux desktop hosts
[22:03:48] jphase: has joined #RubyOnRails
[22:03:53] alfie: active directory is (unfortunately) unparallelled
[22:04:21] alfie: and, fuck, we were all windows hosts, we had... four ransomware infections across about 30,000 hosts? :P
[22:04:34] alfie: i agree with you in some places, but it's not fair to misrepresent windows as universally bad
[22:04:38] alfie: it's just fucking disrespectful :P
[22:04:46] alfie: (windows, i mean: windows is disrespectful)
[22:05:04] alfie: and, as i was saying dminuoso: the problem I have with windows is mainly one of accessibility; macOS is still the only OS that doesn't give me migraines :D
[22:05:38] alfie: also easy modifier remapping, competent font rendering, _an actual goddamn os-wide high-contrast setting that doesn't make fun of me_, etc, etc
[22:07:54] alfie: anyway, i'll stop ranting :P
[22:11:25] snake38: I'm hoping the wave of ransomware attacks will make companies questions their decisions of deploying windows, for now they are stuck with it since it is what everyone else uses
[22:11:41] alfie: snake38: it's... not that simple, again
[22:11:55] alfie: there are _no alternatives_ in corporate environments right now
[22:14:36] snake38: if you say so
[22:16:20] alfie: i... do? :P
[22:16:33] jphase: has joined #RubyOnRails
[22:22:23] dminuoso: alfie: And unlike Linux it just works.
[22:22:37] dminuoso: alfie: Im traumatized by configuring WiFi 15 years ago.
[22:22:45] snake38: linux in 2017 "just works"
[22:22:48] alfie: i'm traumatized by configuring wifi on linux a few months back tbh
[22:22:52] alfie: snake38: that's bullshit and you know it :P
[22:22:59] dminuoso: snake38: It does not
[22:23:10] alfie: i have three maintained desktop linux systems rn
[22:23:10] snake38: give the latest ubuntu a try
[22:23:13] alfie: it does _not_ "just work"
[22:23:19] alfie: oh come on, ubuntu is more disrespectful than windows!
[22:23:49] dminuoso: macOS is the closest "it just works", en par with Windows, from a users perspective.
[22:24:22] dminuoso: But I dont want to go on a rant why Linux requires so much effort to live on.
[22:24:27] snake38: macos has to work with only a specific subset of hardware, linux supports more hardware than all OS combined
[22:24:30] alfie: ubuntu's mouse support genuinely makes me nauseous :D
[22:24:46] alfie: (migraine a _weird_ condition)
[22:24:59] alfie: but yeah, i'll keep buying Macs because to be frank? everything else is just _bad_
[22:25:10] alfie: i had an XPS13 for a grand total of a week before I sent it back because it just felt... horrible
[22:25:12] snake38: alfie: I disagree with that
[22:26:52] dminuoso: Last week my Linux Mint X11 broke because I clicked the wrong button. Had to do some shenanigans with apt just to get my graphical user interface back.
[22:28:06] alfie: dminuoso: i consistently argue with people over apt vs aptitude
[22:28:21] alfie: people get VERY UPSET i choose the one that resolves conflicts for me :P
[22:32:13] blackmesa1: has joined #RubyOnRails
[22:32:21] snake38: macos is no better than linux, it lacks a proper package manager and homebrew doesn't even come close, its window manager is also inferior compared to i3 or even GNOME, bash and other CLI tools are also out of date on macos, plus I don't like paying for unix
[22:34:07] alfie: most of these are valid criticism
[22:34:15] alfie: but in the grand scheme of things, they mean very little
[22:34:29] alfie: and i think that's the difference between a toy environment and a productive environment
[22:37:55] baweaver: ACTION wanders in
[22:41:07] alfie: o/ baweaver
[22:41:20] alfie: don't mind us, we're just spouting meaningless bullshit
[22:42:00] conta2: has joined #RubyOnRails
[22:43:12] mikecmpbll: has joined #RubyOnRails
[22:43:28] baweaver: An apt description
[22:43:32] baweaver: dminuoso: yes, yes I did.
[22:45:28] baweaver: So I have a fun one. We have to double-mount a rails site for a transfer from a subdomain to a subdirectory: foo.bar.com -> new.bar.com/foo
[22:45:29] baweaver: and keep both working at the same time
[23:01:15] hfp_work: has joined #RubyOnRails
[23:11:16] jphase: has joined #RubyOnRails
[23:14:14] gusrub: has joined #RubyOnRails
[23:14:28] jphase: has joined #RubyOnRails
[23:25:34] TViernion: has joined #RubyOnRails
[23:34:15] mtkd: has joined #RubyOnRails
[23:37:14] atrius: has joined #RubyOnRails
[23:43:06] TerianceViernion: has joined #RubyOnRails
[23:44:52] jphase: has joined #RubyOnRails
[23:48:05] blackmesa1: has joined #RubyOnRails
[23:55:56] blackmesa: has joined #RubyOnRails
[23:56:28] irishfromua: has joined #RubyOnRails
[23:56:40] coder2000_: has joined #RubyOnRails
[23:57:00] orbyt_: has joined #RubyOnRails