« Back to channel list

#RubyOnRails - 19 June 2018

« Back 1 day Forward 1 day »
[00:03:24] matyf: has joined #RubyOnRails
[00:03:44] lxsameer: has joined #RubyOnRails
[00:05:01] cagomez: has joined #RubyOnRails
[00:13:59] lxsameer: has joined #RubyOnRails
[00:17:01] dogweather: has joined #RubyOnRails
[00:24:14] lxsameer: has joined #RubyOnRails
[00:26:46] dogweather: has joined #RubyOnRails
[00:34:02] RougeR: has joined #RubyOnRails
[00:34:25] lxsameer: has joined #RubyOnRails
[00:34:41] beilabs: has joined #RubyOnRails
[00:34:55] JamJam_kid: has joined #RubyOnRails
[00:35:04] RougeR: has joined #RubyOnRails
[00:40:54] roamingdog: has joined #RubyOnRails
[00:41:29] matyf: has joined #RubyOnRails
[00:44:42] lxsameer: has joined #RubyOnRails
[00:49:03] matyf: has joined #RubyOnRails
[00:54:50] lxsameer: has joined #RubyOnRails
[00:54:54] chouhoulis: has joined #RubyOnRails
[00:55:10] darkhanb: has joined #RubyOnRails
[01:04:41] mjolnird: has joined #RubyOnRails
[01:05:07] lxsameer: has joined #RubyOnRails
[01:06:52] chouhoulis: has joined #RubyOnRails
[01:10:32] darkhanb: has joined #RubyOnRails
[01:15:15] matyf: has joined #RubyOnRails
[01:15:19] lxsameer: has joined #RubyOnRails
[01:25:29] lxsameer: has joined #RubyOnRails
[01:27:44] quazimodo: has joined #RubyOnRails
[01:27:58] quazimodo: Here's a super weird one
[01:28:03] quazimodo: c.send(:base_relation).where.not(score: nil).pluck(:score).all?{|score| score.is_a? Numeric}
[01:28:13] quazimodo: c.send(:base_relation).where.not(score: nil).pluck(:score).sum
[01:28:24] quazimodo: is my number too big?
[01:34:43] dogweather: has joined #RubyOnRails
[01:35:42] lxsameer: has joined #RubyOnRails
[01:36:37] havenwood: quazimodo: Check?: score.instance_of? Numeric
[01:40:20] havenwood: quazimodo: Yes, too big. Array#sum does NaN rather than Infinity, oddly.
[01:41:59] havenwood: [Float::INFINITY].sum #=> NaN
[01:45:23] havenwood: Same with Enumerable#sum: Float::INFINITY.then.sum #=> NaN
[01:45:58] lxsameer: has joined #RubyOnRails
[01:46:07] havenwood: It *is* a number! Just a big one.
[01:50:19] dogweather: has joined #RubyOnRails
[01:56:09] lxsameer: has joined #RubyOnRails
[02:06:20] chouhoulis: has joined #RubyOnRails
[02:06:22] lxsameer: has joined #RubyOnRails
[02:06:35] matyf: has joined #RubyOnRails
[02:10:48] havenwood: Or is a hyperreal number not a number? ¯\_(ツ)_/¯
[02:12:38] havenwood: It's a NaRN (Not a Real Number).
[02:16:33] lxsameer: has joined #RubyOnRails
[02:17:18] havenwood: http://www.math.harvard.edu/~knill/teaching/mathe320_2015_fall/blog15/surreal1.pdf
[02:18:25] dogweather: has joined #RubyOnRails
[02:23:10] roamingdog: has joined #RubyOnRails
[02:23:36] sevenseacat: has joined #RubyOnRails
[02:26:50] lxsameer: has joined #RubyOnRails
[02:27:28] orbyt_: has joined #RubyOnRails
[02:28:02] dogweather: has joined #RubyOnRails
[02:34:24] dogweather: has joined #RubyOnRails
[02:37:04] lxsameer: has joined #RubyOnRails
[02:47:13] lxsameer: has joined #RubyOnRails
[02:50:09] timdotrb: has joined #RubyOnRails
[02:51:08] timdotrb: has joined #RubyOnRails
[02:56:18] chouhoulis: has joined #RubyOnRails
[02:57:30] lxsameer: has joined #RubyOnRails
[02:57:41] matyf: has joined #RubyOnRails
[02:59:51] cagomez: has joined #RubyOnRails
[03:01:47] dogweather: has joined #RubyOnRails
[03:02:16] darkhanb: has joined #RubyOnRails
[03:07:38] lxsameer: has joined #RubyOnRails
[03:09:41] braincrash: has joined #RubyOnRails
[03:13:14] eckhardt: has joined #RubyOnRails
[03:16:17] dogweather: has joined #RubyOnRails
[03:17:55] lxsameer: has joined #RubyOnRails
[03:21:33] kapil___: has joined #RubyOnRails
[03:25:17] quazimodo: there was a NaN in the fucking database!
[03:28:09] lxsameer: has joined #RubyOnRails
[03:29:07] beilabs: has joined #RubyOnRails
[03:29:51] beilabs: has joined #RubyOnRails
[03:30:38] havenwood: quazimodo: oh, wow!
[03:36:29] dogweather: has joined #RubyOnRails
[03:38:20] lxsameer: has joined #RubyOnRails
[03:42:40] crankharder: has joined #RubyOnRails
[03:44:47] srinidhi: has joined #RubyOnRails
[03:46:34] tdy: has joined #RubyOnRails
[03:48:35] lxsameer: has joined #RubyOnRails
[03:49:27] dogweather: has joined #RubyOnRails
[03:57:42] dogweather: has joined #RubyOnRails
[03:58:47] lxsameer: has joined #RubyOnRails
[04:08:58] lxsameer: has joined #RubyOnRails
[04:16:09] quazimodo: how does postrges let you put a goddamn NaN in a float column
[04:16:21] quazimodo: my head literally hurts
[04:16:34] quazimodo: Not A Fucking Number!
[04:17:00] Technodrome: has joined #RubyOnRails
[04:17:20] quazimodo: i'm very likely wrong but man does that chafe my ass
[04:17:42] beilabs: has joined #RubyOnRails
[04:18:06] quazimodo: customer's all like 'babli boo, boobly babble *thumps chest*' because all te shit went down because of this and the f act that the previous goddamn contractors didn't validate jack shit before it went into the database
[04:18:43] Radar: so you're bitching about it in here instead of fixing it?
[04:19:00] Radar: https://www.postgresql.org/docs/10.6/static/datatype-numeric.html
[04:19:07] Radar: Any operation on NaN yields another NaN. When writing this value as a constant in an SQL command, you must put quotes around it, for example UPDATE table SET x = 'NaN'.
[04:19:13] lxsameer: has joined #RubyOnRails
[04:19:26] Radar: So did your code set it that way because Ruby sure as shit doesn't have NaN.
[04:19:53] Radar: Oh. it does. Wellllll then .
[04:20:02] Radar: 0.0/0 <- I thought this used to raise an exception.
[04:20:55] Radar: in related news: y u no database constraints on that field? https://www.postgresql.org/docs/10/static/ddl-constraints.html
[04:25:42] dogweather: has joined #RubyOnRails
[04:29:26] lxsameer: has joined #RubyOnRails
[04:34:03] tbuehlmann: 0/0 raises, though
[04:35:36] tbuehlmann: didn't know about NaN either, only Infinity
[04:38:01] eckhardt: has joined #RubyOnRails
[04:39:36] lxsameer: has joined #RubyOnRails
[04:49:50] lxsameer: has joined #RubyOnRails
[05:00:08] lxsameer: has joined #RubyOnRails
[05:06:47] dogweather: has joined #RubyOnRails
[05:09:44] srinidhi: has joined #RubyOnRails
[05:10:15] lxsameer: has joined #RubyOnRails
[05:12:01] conta: has joined #RubyOnRails
[05:12:19] havenwood: require 'objspace'; ObjectSpace.each_object.reject { |obj| obj == obj } #=> [NaN]
[05:13:14] havenwood: It tends to be the only thing around that doesn't twoquals itself.
[05:14:18] havenwood: require 'objspace'; ObjectSpace.each_object.count { |obj| obj != obj } #=> 1
[05:15:00] dionysus69: has joined #RubyOnRails
[05:18:08] havenwood: module Contrarian; module_function def == obj; !super end end; require 'objspace'; ObjectSpace.each_object.select { |obj| obj != obj } #=> [NaN, Contrarian]
[05:18:59] reber: has joined #RubyOnRails
[05:20:32] lxsameer: has joined #RubyOnRails
[05:28:00] dogweather: has joined #RubyOnRails
[05:30:42] lxsameer: has joined #RubyOnRails
[05:37:30] dogweather: has joined #RubyOnRails
[05:41:01] lxsameer: has joined #RubyOnRails
[05:51:07] lxsameer: has joined #RubyOnRails
[05:51:49] srinidhi: has joined #RubyOnRails
[06:01:20] lxsameer: has joined #RubyOnRails
[06:10:15] benlieb: has joined #RubyOnRails
[06:11:34] lxsameer: has joined #RubyOnRails
[06:13:54] dionysus69: has joined #RubyOnRails
[06:20:22] sandstrom: has joined #RubyOnRails
[06:21:50] lxsameer: has joined #RubyOnRails
[06:32:31] lxsameer: has joined #RubyOnRails
[06:33:12] Tempesta: has joined #RubyOnRails
[06:36:42] dogweather: has joined #RubyOnRails
[06:36:49] mtkd: has joined #RubyOnRails
[06:43:52] rafaeldelucena: has joined #RubyOnRails
[06:44:41] p8m: has joined #RubyOnRails
[06:49:21] dionysus70: has joined #RubyOnRails
[07:00:41] dogweather: has joined #RubyOnRails
[07:13:24] dogweather: has joined #RubyOnRails
[07:17:29] lxsameer: has joined #RubyOnRails
[07:20:58] dminuoso: has left #RubyOnRails: ("WeeChat 2.0.1")
[07:33:27] ams__: has joined #RubyOnRails
[07:45:59] psychoslave_: has joined #RubyOnRails
[07:48:17] mikecmpbll: has joined #RubyOnRails
[07:53:55] mikecmpb_: has joined #RubyOnRails
[07:55:01] Slyda1: has joined #RubyOnRails
[07:58:28] lxsameer: has joined #RubyOnRails
[08:15:12] tambet: has joined #RubyOnRails
[08:18:54] tambet: has joined #RubyOnRails
[08:22:54] schneider: has joined #RubyOnRails
[08:26:27] srinidhi: has joined #RubyOnRails
[08:33:54] beilabs_: has joined #RubyOnRails
[08:36:31] thortron: has joined #RubyOnRails
[08:37:09] jottr: has joined #RubyOnRails
[08:41:11] beilabs: has joined #RubyOnRails
[09:03:09] bijan_: has joined #RubyOnRails
[09:08:23] anikras: has joined #RubyOnRails
[09:09:01] jottr: has joined #RubyOnRails
[09:09:19] havenwood: has joined #RubyOnRails
[09:11:27] anikras: hi, I have a project with ruby&rails and MySQL database. I would like to use docker, any tutorial to do this ?
[09:36:26] mikecmpbll: has joined #RubyOnRails
[09:39:55] mjolnird: has joined #RubyOnRails
[09:51:38] beilabs: has joined #RubyOnRails
[09:55:49] gregf_: has joined #RubyOnRails
[10:01:12] za1b1tsu: has joined #RubyOnRails
[10:16:09] dogweather: has joined #RubyOnRails
[10:16:29] srinidhi: has joined #RubyOnRails
[10:18:28] agent_white: has joined #RubyOnRails
[10:31:02] srinidhi: has joined #RubyOnRails
[10:39:09] apparition: has joined #RubyOnRails
[10:42:08] GodFather: has joined #RubyOnRails
[11:01:48] mikecmpbll: has joined #RubyOnRails
[11:06:26] lunarkitty7: has joined #RubyOnRails
[11:20:38] tambet: has joined #RubyOnRails
[11:40:26] jlebrech: has joined #RubyOnRails
[11:42:00] jlebrech: when I precompile, asset_tags don't point to the right place in public/ can I tell it to look for stylesheets in public/assets instead of public/stylesheets?
[12:01:17] beilabs: has joined #RubyOnRails
[12:06:50] jlebrech: anyone know much about sprockets?
[12:08:05] fabiob: has joined #RubyOnRails
[12:08:16] fabiob: Hi, I need a JSONB column, do I need to use PostgreSQL in my development and test databases as well?
[12:09:22] jottr: has joined #RubyOnRails
[12:10:07] GodFather: has joined #RubyOnRails
[12:16:14] tbuehlmann: fabiob: yes, having development/production parity is a good thing
[12:23:19] mikecmpb_: has joined #RubyOnRails
[12:32:28] mikecmpbll: has joined #RubyOnRails
[12:32:54] fabiob: tbuehlmann: Thanks. I assume the same thing holds true for tests as well?
[12:38:33] Technodrome: has joined #RubyOnRails
[12:44:23] dogweather: has joined #RubyOnRails
[12:48:04] jottr: has joined #RubyOnRails
[13:01:48] fmcgeough: has joined #RubyOnRails
[13:05:57] ElFerna: has joined #RubyOnRails
[13:13:09] dogweather: has joined #RubyOnRails
[13:23:33] RougeR: has joined #RubyOnRails
[13:23:47] RougeR: can anyone offer input on how i style text boxes in rails
[13:23:54] RougeR: i want a large comment box with the cursor at the top left
[13:24:07] RougeR: once you reach the edge of the comment box it should then go to the next line
[13:32:35] bitch: has joined #RubyOnRails
[13:46:07] ElFerna: has joined #RubyOnRails
[13:47:13] crankharder: RougeR: same way you style large text boxes in any other framework
[13:47:26] RougeR: crankharder: okay
[13:47:29] RougeR: its not working for me
[13:47:36] RougeR: i didnt know if something funny was going on
[13:47:50] RougeR: just setting height/width does not work
[13:48:05] dogweather: has joined #RubyOnRails
[13:50:44] Technodrome: has joined #RubyOnRails
[14:00:50] Inside: has joined #RubyOnRails
[14:02:15] Inside: So a question - let's say that you have a resource and there are many ways to modify the resource. Do you guysh have multiple controllers or do you have multiple actions for it?
[14:02:32] fryguy: sort of depends what the "many ways" are
[14:03:21] Inside: Well - let's say that there is a resource where some users are able to edit all fields and special users are able to edit only some fields.
[14:04:55] Inside: There are 3 ways i can see of doing it: a ResourceController & Admin::ResourceController with a new action, a new/new_admin action, and new (with params)
[14:06:05] Inside: (In some situations an admin user may want to view the low level view because it'll do additional validations)
[14:07:04] Inside: I've been doing #3 (in order to keep a single controller + action), but it creates a fat controller where the code branches depending on the permissions of the user
[14:07:49] fryguy: are you using strong_parameters?
[14:08:17] Inside: Well - based on the permission level
[14:08:37] Inside: so it'll be -- if(admin) { params_for_admin } else { params_for_user }
[14:08:47] dionysus69: has joined #RubyOnRails
[14:08:55] Inside: (except in Ruby ~_~)
[14:09:27] BloopMonsterOMG: has joined #RubyOnRails
[14:10:45] chouhoulis: has joined #RubyOnRails
[14:18:02] kapil___: has joined #RubyOnRails
[14:24:32] dogweather: has joined #RubyOnRails
[14:25:12] srinidhi: has joined #RubyOnRails
[14:26:12] catphish: has joined #RubyOnRails
[14:31:07] ^mtkd: has joined #RubyOnRails
[14:32:45] agent_white: has joined #RubyOnRails
[14:47:22] jottr: has joined #RubyOnRails
[14:47:35] lxsameer: has joined #RubyOnRails
[14:57:24] apeiros: has joined #RubyOnRails
[14:57:25] lxsameer: has joined #RubyOnRails
[14:59:29] Inside: More controllers for everything it is!
[14:59:50] tdy: has joined #RubyOnRails
[15:07:30] lxsameer: has joined #RubyOnRails
[15:12:06] dionysus69: has joined #RubyOnRails
[15:15:18] jottr: has joined #RubyOnRails
[15:15:43] chouhoulis: has joined #RubyOnRails
[15:17:04] lxsameer: has joined #RubyOnRails
[15:21:23] tcopeland: has joined #RubyOnRails
[15:23:05] dar123: has joined #RubyOnRails
[15:44:14] Saukk: has joined #RubyOnRails
[15:57:40] cagomez: has joined #RubyOnRails
[16:04:49] catphish: has left #RubyOnRails: ("Leaving")
[16:15:45] jcarl43: has joined #RubyOnRails
[16:15:59] glassresistor: has joined #RubyOnRails
[16:32:30] Guest58336: has joined #RubyOnRails
[16:38:05] orbyt_: has joined #RubyOnRails
[16:38:06] krawchyk: has joined #RubyOnRails
[16:40:17] glassresistor: has joined #RubyOnRails
[16:48:04] kristofferR: has joined #RubyOnRails
[16:54:49] cagomez: has joined #RubyOnRails
[16:58:59] [Butch]: has joined #RubyOnRails
[17:05:06] jcarl43: has joined #RubyOnRails
[17:12:41] Guest58336: has joined #RubyOnRails
[17:19:04] srinidhi: has joined #RubyOnRails
[17:19:33] jcarl43: has joined #RubyOnRails
[17:20:07] cagomez: has joined #RubyOnRails
[17:35:09] cagomez: did anyone see the blog post that compared how "heavyweight" loading objects was in rails? I can't seem to find it and would appreciate a link
[17:35:47] tbuehlmann: do you mean this? https://samsaffron.com/archive/2018/06/01/an-analysis-of-memory-bloat-in-active-record-5-2
[17:40:27] cagomez: tbuehlmann: I think so, thanks
[17:41:35] freakpirate: has joined #RubyOnRails
[17:44:17] cagomez: has joined #RubyOnRails
[17:45:16] chouhoulis: has joined #RubyOnRails
[17:48:27] freakpirate: Hi guys, Can somebody point me in the right direction on how to integrate a rails 3.2 ActionMailer app with Sidekiq?
[17:49:49] Aherin: has joined #RubyOnRails
[17:50:13] freakpirate: I tried to follow ("https://www.dailydrip.com/topics/sidekiq/drips/deployment") tutorial, but it only seems to work with rails 4.2 and above
[17:52:30] Guest58336: has joined #RubyOnRails
[17:54:53] dar123: has joined #RubyOnRails
[17:55:30] ynonp: has joined #RubyOnRails
[18:02:42] Guest58336: has joined #RubyOnRails
[18:03:04] kristoff_: has joined #RubyOnRails
[18:03:21] beilabs: has joined #RubyOnRails
[18:04:04] mtkd: has joined #RubyOnRails
[18:10:26] mikecmpbll: has joined #RubyOnRails
[18:23:27] ellcs: has joined #RubyOnRails
[18:23:35] Inside: Wow that's kind of awful
[18:31:12] mtkd: has joined #RubyOnRails
[18:35:58] skryking: has joined #RubyOnRails
[18:47:44] Guest58336: has joined #RubyOnRails
[18:48:36] mtkd: has joined #RubyOnRails
[18:49:23] DoubleMalt: has joined #RubyOnRails
[19:02:15] dopie: has joined #RubyOnRails
[19:02:20] dopie: %img.background-image{:alt => "Background Image", :src => "app/assets/images/cover11.jpg", :style => "display: none;"}/
[19:02:32] dopie: how would i transform that into rails?
[19:02:44] dopie: asset pipeline
[19:11:53] fryguy: `image_path('cover11.jpg')
[19:17:28] tdy: has joined #RubyOnRails
[19:19:07] cagomez: has joined #RubyOnRails
[19:20:54] Technodrome: has joined #RubyOnRails
[19:21:59] GodFather: has joined #RubyOnRails
[19:34:46] kapil___: has joined #RubyOnRails
[19:34:51] cagomez: has joined #RubyOnRails
[19:37:29] Guest58336: has joined #RubyOnRails
[19:44:14] orbyt_: has joined #RubyOnRails
[19:47:42] Guest58336: has joined #RubyOnRails
[19:50:35] cagomez: has joined #RubyOnRails
[19:56:35] sameerynho: has joined #RubyOnRails
[20:02:35] Guest58336: has joined #RubyOnRails
[20:06:33] cagomez: has joined #RubyOnRails
[20:09:51] chouhoulis: has joined #RubyOnRails
[20:12:35] Guest58336: has joined #RubyOnRails
[20:12:56] dogweather: has joined #RubyOnRails
[20:15:27] akaiiro: has joined #RubyOnRails
[20:19:42] dionysus69: has joined #RubyOnRails
[20:24:09] kevinburke: has joined #RubyOnRails
[20:24:09] kevinburke: I have "def readonly?" defined on a ActiveRecord model
[20:24:30] kevinburke: inside that function there's "attribute_changed?(:state)"
[20:24:33] kevinburke: and I'm getting an error
[20:24:46] kevinburke: "The behavior of attribute_changed inside of after callbacks will be changing..."
[20:25:09] kevinburke: which seems weird, because it seems like you would want to check a function named "readonly" before persisting to the database.
[20:25:22] kevinburke: I'm pretty sure Rails/ActiveRecord checks that function not me
[20:25:44] GodFather: has joined #RubyOnRails
[20:41:21] MrCrackPotBuilde: has joined #RubyOnRails
[20:42:09] MrCrackPotBuilde: how would i use this with the asset pipeline import PrefabExample from “../prefabs/PrefabExample.js”;
[20:42:37] MrCrackPotBuilde: nowmally i use //=require /prefabs/prefabexample
[20:43:02] MrCrackPotBuilde: or i would use @import "/prefab/prefabexample"
[20:44:43] MrCrackPotBuilde: i tried to make a setup.js with all my requires in the order that its needed but i think the import PrefabExample from “../prefabs/PrefabExample.js”; statements are broken because of the pipeline. everything works when not integrated with rails
[20:46:55] benlieb: has joined #RubyOnRails
[20:57:39] Guest58336: has joined #RubyOnRails
[20:59:59] ams__: has joined #RubyOnRails
[21:07:40] Guest58336: has joined #RubyOnRails
[21:08:55] dionysus70: has joined #RubyOnRails
[21:09:04] workmad3: has joined #RubyOnRails
[21:41:53] jottr: has joined #RubyOnRails
[21:50:30] dgsan: has joined #RubyOnRails
[21:52:41] Guest58336: has joined #RubyOnRails
[22:02:44] Guest58336: has joined #RubyOnRails
[22:25:14] KeyJoo: has joined #RubyOnRails
[22:25:44] Radar: GOOD MORNING
[22:30:01] Inside: RADAR \o/
[22:31:32] orbyt_: has joined #RubyOnRails
[22:42:33] Guest58336: has joined #RubyOnRails
[23:02:56] chouhoulis: has joined #RubyOnRails
[23:06:36] Technodrome: has joined #RubyOnRails
[23:07:15] chouhoulis: has joined #RubyOnRails
[23:09:28] workmad3: has joined #RubyOnRails
[23:10:48] quazimodo: has joined #RubyOnRails
[23:12:57] chouhoulis: has joined #RubyOnRails
[23:13:12] dogweather: has joined #RubyOnRails
[23:18:27] chouhoulis: has joined #RubyOnRails
[23:22:19] dgsan: Is there a straightforward way of handling "accepts_nested_attributes_for" in the case of has many through, where the value being submitted in the form may or may not already exist as a unique key in the final table?
[23:22:20] dgsan: Essentially:
[23:22:20] dgsan: Model A has many model Q through join table B. Model Q.q is a unique field on Q, and in a form for A you can put in a value for Q.q to find or create Q, and then, if it doesn't exist, create B.
[23:22:20] dgsan: Is catching ActiveRecord::RecordNotUnique essentially the best way?
[23:22:30] Guest58336: has joined #RubyOnRails
[23:23:47] chouhoulis: has joined #RubyOnRails
[23:24:03] cagomez: is there a way to profile the `render` method for a controller? I'm looking to measure the performance when using substituting the serializer in `each_serializer`
[23:26:10] dogweather: has joined #RubyOnRails
[23:29:11] chouhoulis: has joined #RubyOnRails
[23:32:32] Guest58336: has joined #RubyOnRails
[23:34:59] chouhoulis: has joined #RubyOnRails
[23:37:49] Guest58336: has joined #RubyOnRails
[23:38:39] Technodrome: has joined #RubyOnRails
[23:40:28] chouhoulis: has joined #RubyOnRails
[23:44:17] nickjj: has joined #RubyOnRails
[23:45:45] chouhoulis: has joined #RubyOnRails
[23:51:13] chouhoulis: has joined #RubyOnRails
[23:56:42] chouhoulis: has joined #RubyOnRails