« Back to channel list

#RubyOnRails - 25 July 2018

« Back 1 day Forward 1 day »
[00:10:01] IanMalcolm: has joined #RubyOnRails
[00:11:32] krawchyk: has joined #RubyOnRails
[00:12:31] chouhoulis: has joined #RubyOnRails
[00:17:01] rfoust: has joined #RubyOnRails
[00:19:15] chouhoulis: has joined #RubyOnRails
[00:23:14] apeiros: has joined #RubyOnRails
[00:25:17] chouhoulis: has joined #RubyOnRails
[00:26:37] spohnz_: has joined #RubyOnRails
[00:31:14] chouhoulis: has joined #RubyOnRails
[00:35:26] spohnz_: has joined #RubyOnRails
[00:40:06] chouhoulis: has joined #RubyOnRails
[00:45:36] chouhoulis: has joined #RubyOnRails
[00:48:01] dallas__spohn: has joined #RubyOnRails
[00:52:23] apeiros: has joined #RubyOnRails
[00:52:51] sevenseacat: has joined #RubyOnRails
[00:57:42] chouhoulis: has joined #RubyOnRails
[01:01:09] unreal: has joined #RubyOnRails
[01:03:11] chouhoulis: has joined #RubyOnRails
[01:08:38] chouhoulis: has joined #RubyOnRails
[01:08:57] vedu_: has joined #RubyOnRails
[01:14:33] chouhoulis: has joined #RubyOnRails
[01:18:06] crankharder: has joined #RubyOnRails
[01:18:23] apeiros: has joined #RubyOnRails
[01:20:52] chouhoulis: has joined #RubyOnRails
[01:28:31] chouhoulis: has joined #RubyOnRails
[01:28:50] dviola: has joined #RubyOnRails
[01:29:55] Technodrome: has joined #RubyOnRails
[01:31:08] krawchyk: has joined #RubyOnRails
[01:35:07] chouhoulis: has joined #RubyOnRails
[01:40:31] apeiros: has joined #RubyOnRails
[01:45:03] chouhoulis: has joined #RubyOnRails
[01:45:47] quazimodo: has joined #RubyOnRails
[01:49:16] crankharder: has joined #RubyOnRails
[01:50:33] chouhoulis: has joined #RubyOnRails
[01:56:05] chouhoulis: has joined #RubyOnRails
[02:01:53] chouhoulis: has joined #RubyOnRails
[02:07:28] apeiros: has joined #RubyOnRails
[02:09:35] chouhoulis: has joined #RubyOnRails
[02:14:48] chouhoulis: has joined #RubyOnRails
[02:16:57] spohnz_: has joined #RubyOnRails
[02:20:15] chouhoulis: has joined #RubyOnRails
[02:25:49] chouhoulis: has joined #RubyOnRails
[02:30:25] apeiros: has joined #RubyOnRails
[02:32:23] chouhoulis: has joined #RubyOnRails
[02:37:48] chouhoulis: has joined #RubyOnRails
[02:39:21] dmarr: has joined #RubyOnRails
[02:40:56] spohnz: has joined #RubyOnRails
[02:47:07] spohnz: has joined #RubyOnRails
[02:48:37] spohnz: has joined #RubyOnRails
[02:49:56] chouhoulis: has joined #RubyOnRails
[02:50:00] spohnz: has joined #RubyOnRails
[02:53:57] apeiros: has joined #RubyOnRails
[02:55:28] chouhoulis: has joined #RubyOnRails
[03:02:00] chouhoulis: has joined #RubyOnRails
[03:04:02] lunarkitty7: has joined #RubyOnRails
[03:04:19] za1b1tsu: has joined #RubyOnRails
[03:07:35] chouhoulis: has joined #RubyOnRails
[03:10:48] braincrash: has joined #RubyOnRails
[03:15:31] apeiros: has joined #RubyOnRails
[03:18:01] darkhanb: has joined #RubyOnRails
[03:20:46] chouhoulis: has joined #RubyOnRails
[03:25:21] Caerus: has joined #RubyOnRails
[03:26:17] chouhoulis: has joined #RubyOnRails
[03:32:08] chouhoulis: has joined #RubyOnRails
[03:37:17] chouhoulis: has joined #RubyOnRails
[03:38:39] apeiros: has joined #RubyOnRails
[03:41:53] spohnz: has joined #RubyOnRails
[03:50:33] chouhoulis: has joined #RubyOnRails
[03:56:01] chouhoulis: has joined #RubyOnRails
[04:00:53] Technodrome: has joined #RubyOnRails
[04:01:38] apeiros: has joined #RubyOnRails
[04:01:46] chouhoulis: has joined #RubyOnRails
[04:06:57] chouhoulis: has joined #RubyOnRails
[04:12:30] chouhoulis: has joined #RubyOnRails
[04:23:37] apeiros: has joined #RubyOnRails
[04:30:05] chouhoulis: has joined #RubyOnRails
[04:35:04] spohnz_: has joined #RubyOnRails
[04:35:42] chouhoulis: has joined #RubyOnRails
[04:36:11] tdy: has joined #RubyOnRails
[04:41:14] chouhoulis: has joined #RubyOnRails
[04:44:09] Saukk: has joined #RubyOnRails
[04:46:40] chouhoulis: has joined #RubyOnRails
[04:46:47] apeiros: has joined #RubyOnRails
[04:48:39] osp2: hi all I'm going through the rails tutorial and decided to set up my project with rspec because that's what we use at work
[04:49:01] osp2: but I'm having a tough time following the tests in the examples because they don't use rspec (I think it's minitest instead?)
[04:49:19] osp2: does anyone have something they can link to so I can learn how to write the equivalent tests in rspec?
[04:49:45] osp2: e.g.: https://www.railstutorial.org/book/updating_and_deleting_users#code-unsuccessful_edit_test
[04:49:48] sevenseacat: if you're just picking up rails, I'd use whatever the tutorial uses
[04:50:34] osp2: so I've been a "back end engineer" at work for almost a year now so I'm familiar with the M portion of rails mvc and I'm familiar with rspec since that's what we use
[04:50:49] osp2: which is why I decided to start hte tutorial like that
[04:50:52] osp2: but now I"m 10 chapters deep lol
[04:51:20] sevenseacat: ok so you're good with rspec. which parts of the tests can't you translate to rspec?
[04:51:25] osp2: the portions of the tutorial where we tested models was easy for me to convert to rspec, but it's the controller/view/integration tests I'm having a tough time with
[04:51:37] hkais: has joined #RubyOnRails
[04:51:57] osp2: e.g. I ran this following the tutorial: "rails g integration_test users_edit"
[04:52:05] osp2: which created an rspec test file for me
[04:52:10] chouhoulis: has joined #RubyOnRails
[04:52:19] osp2: but it tries to "get users_edits_path"
[04:52:35] osp2: which name errors: NameError:
[04:52:36] osp2: undefined local variable or method `users_edits_path' for #<RSpec::ExampleGroups::UsersEdits::GETUsersEdits:0x000000067732c8>
[04:52:36] osp2: Did you mean? users_path
[04:52:49] sevenseacat: users_edits_path is not correct
[04:52:52] hkais: could someone confirm me, that RoR is the highly recommended doc generation tool rdoc?
[04:53:08] sevenseacat: thats not what the test uses
[04:53:59] sevenseacat: hkais: RoR is Ruby on Rails, not rdoc
[04:54:42] hkais: sevenseacat: sorry not native speaking. I am asking what is the recommended tool for generating api docs in rails?
[04:54:58] osp2: ah looks like I should've read the test in the example more deeply; you're right sevenseacat - I shouldn't have assumed the generated test should work out of the box
[04:59:07] vedu_: has joined #RubyOnRails
[04:59:54] chouhoulis: has joined #RubyOnRails
[05:06:30] chouhoulis: has joined #RubyOnRails
[05:06:45] srinidhi: has joined #RubyOnRails
[05:09:42] apeiros: has joined #RubyOnRails
[05:12:02] chouhoulis: has joined #RubyOnRails
[05:17:31] chouhoulis: has joined #RubyOnRails
[05:21:56] vedu_: has joined #RubyOnRails
[05:23:06] chouhoulis: has joined #RubyOnRails
[05:35:14] chouhoulis: has joined #RubyOnRails
[05:42:53] chouhoulis: has joined #RubyOnRails
[05:51:39] chouhoulis: has joined #RubyOnRails
[05:52:59] spohnz: has joined #RubyOnRails
[05:54:15] srinidhi: has joined #RubyOnRails
[06:04:48] chouhoulis: has joined #RubyOnRails
[06:19:11] chouhoulis: has joined #RubyOnRails
[06:25:45] chouhoulis: has joined #RubyOnRails
[06:31:19] chouhoulis: has joined #RubyOnRails
[06:39:32] chouhoulis: has joined #RubyOnRails
[06:48:23] chouhoulis: has joined #RubyOnRails
[06:48:54] za1b1tsu: has joined #RubyOnRails
[06:52:54] spohnz: has joined #RubyOnRails
[06:55:28] chouhoulis: has joined #RubyOnRails
[06:58:03] cagomez: has joined #RubyOnRails
[07:04:12] chouhoulis: has joined #RubyOnRails
[07:05:27] chouhoulis: has joined #RubyOnRails
[07:06:46] srinidhi: has joined #RubyOnRails
[07:13:08] chouhoulis: has joined #RubyOnRails
[07:13:39] spohnz: has joined #RubyOnRails
[07:21:44] Dbugger: has joined #RubyOnRails
[07:24:40] chouhoulis: has joined #RubyOnRails
[07:31:15] chouhoulis: has joined #RubyOnRails
[07:31:50] chouhoulis: has joined #RubyOnRails
[07:40:39] chouhoulis: has joined #RubyOnRails
[07:46:02] chouhoulis: has joined #RubyOnRails
[07:51:08] gambl0re: has joined #RubyOnRails
[07:52:42] chouhoulis: has joined #RubyOnRails
[07:52:56] spohnz: has joined #RubyOnRails
[07:55:10] conta: has joined #RubyOnRails
[07:59:37] chouhoulis: has joined #RubyOnRails
[08:00:48] cheeti: has joined #RubyOnRails
[08:01:05] mikecmpbll: has joined #RubyOnRails
[08:01:56] vedu_: has joined #RubyOnRails
[08:02:16] cheeti: hi iam new to rails 5, after active job complete i want to refresh my home page i am using after_perform. how to refresh home page content
[08:05:53] chouhoulis: has joined #RubyOnRails
[08:07:35] chouhoulis: has joined #RubyOnRails
[08:09:41] reber: has joined #RubyOnRails
[08:14:44] chouhoulis: has joined #RubyOnRails
[08:18:15] reber: has joined #RubyOnRails
[08:20:18] deathwishdave: has joined #RubyOnRails
[08:20:46] Ergo: has joined #RubyOnRails
[08:21:59] ur5us: has joined #RubyOnRails
[08:25:03] moei: has joined #RubyOnRails
[08:26:45] chouhoulis: has joined #RubyOnRails
[08:27:45] cheeti: hi how to refresh page in after_perform
[08:29:36] tbuehlmann: cheeti: your application server and background job worker are different processes, so it's not that easy. one way would be to let the browser poll for updates and reload on a certain update. this could also happen via actioncable (websockets) or server sent events
[08:29:44] ariejan: cheeti: you'll need to notify the client browser to refresh. Look into action cable to send a message and handle that message in JS client side.
[08:31:33] tbuehlmann: (are probably different processes*)
[08:32:28] psychoslave: has joined #RubyOnRails
[08:33:10] hkais: has joined #RubyOnRails
[08:33:26] chouhoulis: has joined #RubyOnRails
[08:35:27] spohnz_: has joined #RubyOnRails
[08:40:03] chouhoulis: has joined #RubyOnRails
[08:45:33] chouhoulis: has joined #RubyOnRails
[08:47:02] alfiemax: has joined #RubyOnRails
[08:51:02] chouhoulis: has joined #RubyOnRails
[08:56:31] chouhoulis: has joined #RubyOnRails
[09:02:03] chouhoulis: has joined #RubyOnRails
[09:04:25] vedu_: has joined #RubyOnRails
[09:04:49] vedu_: has joined #RubyOnRails
[09:16:21] chouhoulis: has joined #RubyOnRails
[09:18:41] nemesit|znc: has joined #RubyOnRails
[09:22:53] chouhoulis: has joined #RubyOnRails
[09:24:06] reber: has joined #RubyOnRails
[09:28:30] chouhoulis: has joined #RubyOnRails
[09:33:54] chouhoulis: has joined #RubyOnRails
[09:35:24] spohnz: has joined #RubyOnRails
[09:39:28] chouhoulis: has joined #RubyOnRails
[09:44:07] chouhoulis: has joined #RubyOnRails
[09:49:45] ur5us: has joined #RubyOnRails
[09:50:32] chouhoulis: has joined #RubyOnRails
[09:51:43] shenghi: has joined #RubyOnRails
[09:53:24] spohnz: has joined #RubyOnRails
[09:57:06] chouhoulis: has joined #RubyOnRails
[09:57:40] apeiros: has joined #RubyOnRails
[10:00:06] hkais: has joined #RubyOnRails
[10:03:39] chouhoulis: has joined #RubyOnRails
[10:10:18] chouhoulis: has joined #RubyOnRails
[10:15:44] chouhoulis: has joined #RubyOnRails
[10:17:49] quazimodo: has joined #RubyOnRails
[10:23:41] snuz: has joined #RubyOnRails
[10:26:48] chouhoulis: has joined #RubyOnRails
[10:32:17] chouhoulis: has joined #RubyOnRails
[10:37:28] garyserjj: has joined #RubyOnRails
[10:42:13] garyserjj: is it good practise to have one's own ID field rather than rely only on rails's ID?
[10:42:55] tbuehlmann: garyserjj: unless you have good reason, use the regular id
[10:43:20] chouhoulis: has joined #RubyOnRails
[10:43:33] snuz: has joined #RubyOnRails
[10:48:24] garyserjj: i'm building a website with multiple users that can log in. One user has most privileges that's the main guy the one that creates other users, if there's only one user on the system then it'd be them. Other users have a tier less e.g. maybe administrative which could be the same or almost as much rights. And other users are just regular users. I could have one user model with a field stating whether administrative or not, and one
[10:48:51] chouhoulis: has joined #RubyOnRails
[10:49:13] garyserjj: So if I don't want to ever have to search for the mainguy, should I have my own ID field, that I can control? Or should I make a new model for the mainguy?
[10:50:35] tbuehlmann: so there's an admin and regular users?
[10:51:49] garyserjj: yeah, or maybe three tiers like mainguy, administrative users, regular users.
[10:51:52] ariejan: garyserjj: you have two options here: put everyone in the database and assign roles (a boolean 'admin' field might be enough) and use an Active Record scope to filter out admins.
[10:52:18] ariejan: garyserjj: the other option is to only store normal users in the database and allow admin access (for instance to namespaced /admin controllers) through HTTP basic auth.
[10:52:34] ariejan: garyserjj: if you have three roles, go for option 1.
[10:52:57] garyserjj: well i can't have a boolean for three options
[10:53:23] spohnz: has joined #RubyOnRails
[10:53:46] garyserjj: and if i had a string or int, it's still suggesting one user database that includes the main guy and i'd be using User.find(privilege:"mainperson")
[10:53:48] tbuehlmann: regarding the id issue: if you don't want people to see increasing id numbers so they can't assume the size of your data, just switch from using bigints to uuids
[10:54:30] garyserjj: if I am doing User.find for the mainperson, then i'm searching for the mainperson which i don't really want to have to do
[10:55:23] chouhoulis: has joined #RubyOnRails
[10:55:46] ariejan: garyserjj: read up on scope and default_scope
[10:56:10] ariejan: garyserjj: User.admin.find(..) will only find admins. User.regular.find(...) will only find regular users.
[10:56:35] garyserjj: ah that's good, thanks
[10:57:53] garyserjj: that is still like a shorthand for searching though isn't it?
[10:58:16] garyserjj: is it quicker in terms of performance?
[11:00:32] garyserjj: like it might just search out the admins once / when there's a change in admins, and then not have to search all users, merely search all admins. Or it might just be a shorthand for searching all users. I'd guess the former.
[11:00:53] chouhoulis: has joined #RubyOnRails
[11:01:58] garyserjj: what i don't like about that syntax though is it's the same syntax as one would use if there was an admin model that belonged to user. So the syntax makes the structure less clear
[11:07:28] chouhoulis: has joined #RubyOnRails
[11:12:24] garyserjj: i can call the scope adminscope then it's clear it's scope.
[11:13:01] chouhoulis: has joined #RubyOnRails
[11:19:38] chouhoulis: has joined #RubyOnRails
[11:32:44] chouhoulis: has joined #RubyOnRails
[11:34:58] spohnz: has joined #RubyOnRails
[11:38:15] chouhoulis: has joined #RubyOnRails
[11:44:07] chouhoulis: has joined #RubyOnRails
[11:47:06] vedu_: has joined #RubyOnRails
[11:53:36] spohnz: has joined #RubyOnRails
[11:55:49] ur5us: has joined #RubyOnRails
[11:55:58] chouhoulis: has joined #RubyOnRails
[12:02:47] chouhoulis: has joined #RubyOnRails
[12:06:37] augcesar: has joined #RubyOnRails
[12:08:02] chouhoulis: has joined #RubyOnRails
[12:12:07] alfiemax: has joined #RubyOnRails
[12:12:14] conta: has joined #RubyOnRails
[12:13:37] chouhoulis: has joined #RubyOnRails
[12:17:21] ariejan: garyserjj: adminscope makes not sense imho
[12:19:25] chouhoulis: has joined #RubyOnRails
[12:27:09] chouhoulis: has joined #RubyOnRails
[12:27:10] Saukk: has joined #RubyOnRails
[12:35:58] chouhoulis: has joined #RubyOnRails
[12:37:21] rfoust: has joined #RubyOnRails
[12:37:43] snuz: has joined #RubyOnRails
[12:41:10] chouhoulis: has joined #RubyOnRails
[12:51:20] jonathanwallace1: has joined #RubyOnRails
[12:52:10] chouhoulis: has joined #RubyOnRails
[12:56:39] mikhael_k33hl: has joined #RubyOnRails
[12:57:02] mikhael_k33hl: How do I log in rails production mode? tried Rails.logger.info, but it doesn't seem to log in log/production.log
[12:57:40] chouhoulis: has joined #RubyOnRails
[12:58:06] ariejan: mikhael_k33hl: Check https://guides.rubyonrails.org/debugging_rails_applications.html#the-logger
[12:58:47] ariejan: mikhael_k33hl: Your configuration may have changed, that page tells you what to look for. (log level, where to log, etc.)
[12:59:41] lexileo: has joined #RubyOnRails
[12:59:53] mikhael_k33hl: ariejan: I can see config.log_level = :debug, but nothing that point to log to production.log even though I can see some logs there
[13:03:28] quazimodo: has joined #RubyOnRails
[13:04:30] mikhael_k33hl: https://gist.github.com/marzdgzmn/c5146d9b9e83fb321c19233168d2e64b So there's no default logger in ruby rails?
[13:06:47] IanMalcolm: has joined #RubyOnRails
[13:12:55] crankhar1er: has joined #RubyOnRails
[13:18:32] ssolomon: has joined #RubyOnRails
[13:18:35] Technodrome: has joined #RubyOnRails
[13:19:54] chouhoulis: has joined #RubyOnRails
[13:26:01] conta1: has joined #RubyOnRails
[13:26:39] chouhoulis: has joined #RubyOnRails
[13:28:22] crankhar1er: has joined #RubyOnRails
[13:29:23] tdy: has joined #RubyOnRails
[13:29:55] srinidhi: has joined #RubyOnRails
[13:32:54] chouhoulis: has joined #RubyOnRails
[13:39:39] chouhoulis: has joined #RubyOnRails
[13:43:21] uksio: has joined #RubyOnRails
[13:47:14] chouhoulis: has joined #RubyOnRails
[13:52:58] chouhoulis: has joined #RubyOnRails
[13:56:35] ur5us: has joined #RubyOnRails
[14:00:28] chouhoulis: has joined #RubyOnRails
[14:04:45] Technodrome: has joined #RubyOnRails
[14:07:48] psychoslave: has joined #RubyOnRails
[14:09:11] chouhoulis: has joined #RubyOnRails
[14:09:15] scrptktty: has joined #RubyOnRails
[14:17:30] chouhoulis: has joined #RubyOnRails
[14:21:45] weird_error: has joined #RubyOnRails
[14:25:49] cjohnson: On rails 4.2, I'm using a postgres jsonb column, and rails knows it's a json column
[14:26:11] cjohnson: When I store the following json document, and then read it back out, I'm getting the json string, not the parsed value: "something"
[14:26:52] cjohnson: I recognize that top-level scalars is not universally supported so I'm wondering if I should expect to have to parse all values in rails, or if rails 4.2 just doesn't recognize top-level scalars yet and I need to add exception cases for that
[14:28:24] crankhar1er: has joined #RubyOnRails
[14:28:28] IanMalcolm: has joined #RubyOnRails
[14:28:29] cjohnson: For clarification the ruby representation of my value would be "\"something\"" but I expect it to be parsed and become "something"
[14:28:46] cjohnson: Looks like no values are being parsed though
[14:32:54] ssolomon: has joined #RubyOnRails
[14:33:43] krawchyk[away]: has joined #RubyOnRails
[14:34:49] KeyJoo: has joined #RubyOnRails
[14:35:38] chouhoulis: has joined #RubyOnRails
[14:37:42] tjbp: has joined #RubyOnRails
[14:40:13] Technodrome: has joined #RubyOnRails
[14:42:06] Inside: what the hell javascript..
[14:42:10] Inside: 23.1 | 0 == 23
[14:43:06] GodFather: has joined #RubyOnRails
[14:45:35] chouhoulis: has joined #RubyOnRails
[14:50:45] vedu_: has joined #RubyOnRails
[14:52:09] chouhoulis: has joined #RubyOnRails
[14:52:25] tdy: has joined #RubyOnRails
[14:57:40] chouhoulis: has joined #RubyOnRails
[14:58:02] chouhoulis: has joined #RubyOnRails
[14:58:42] cjohnson: Inside: That's how bitwise or works...
[14:58:55] cjohnson: It only makes sense on integers, so any non-int is first converted to an int
[14:59:08] cjohnson: Not javascript's fault you are using the wrong tool :)
[14:59:41] cjohnson: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#.7c_%28Bitwise_OR%29
[15:09:11] havenwood: cjohnson: I've always stored Hashes or Arrays in jsonb, and they come out like they go in.
[15:09:53] havenwood: cjohnson: I think it just expects deserialized input. Seems it's serializing your already serialized code.
[15:10:31] havenwood: cjohnson: Seems odd to deserialize it just to serialize it again though. I've never stored something that's already json in jsonb. It'll need to reserialize it either way, since it's going to a binary format.
[15:10:38] dblessing: has joined #RubyOnRails
[15:10:56] havenwood: There might be an elegant way to handle that, but I don't know it.
[15:13:01] cjohnson: havenwood: Sorry let me clarify, I seeded a json document directly into the database using SQL, and the full text of the jsonb document is "something"
[15:13:05] cjohnson: no top-level hash
[15:13:19] cjohnson: Then when I go to read that jsonb column, which rails knows to be jsonb, it reads the json string out, which is "something"
[15:13:26] cjohnson: rather than parsing the json into the value something
[15:13:48] cjohnson: So to me it seems like rails is not deserializing jsonb column on read
[15:14:11] havenwood: cjohnson: I've always seen it deserialize on access. Hrm.
[15:15:32] cjohnson: I'm on 4.2. I even tested a top-level hash just to be sure it wasn't a case where older rails didn't support top-level scalars
[15:15:37] akaiiro: has joined #RubyOnRails
[15:19:32] fryguy: has joined #RubyOnRails
[15:24:55] weird_error: has joined #RubyOnRails
[15:30:10] akaiiro: has joined #RubyOnRails
[15:44:56] IanMalcolm: has joined #RubyOnRails
[15:51:46] crankhar1er: has joined #RubyOnRails
[15:53:40] bonhoeffer: has joined #RubyOnRails
[15:54:25] za1b1tsu: has joined #RubyOnRails
[15:54:51] bonhoeffer: i cant update records on my production site. no problem in dev and not exceptions. any ideas?
[15:55:23] hays: has joined #RubyOnRails
[15:56:13] snuz: has joined #RubyOnRails
[15:59:13] bonhoeffer: has joined #RubyOnRails
[16:00:35] apeiros: has joined #RubyOnRails
[16:01:47] apeiros: has joined #RubyOnRails
[16:02:23] cagomez: has joined #RubyOnRails
[16:08:28] Technodrome: has joined #RubyOnRails
[16:10:19] woohoou: has joined #RubyOnRails
[16:11:17] akaiiro: has joined #RubyOnRails
[16:23:01] GodFather: has joined #RubyOnRails
[16:23:18] Saukk: has joined #RubyOnRails
[16:26:25] Saukk: has joined #RubyOnRails
[16:31:44] cjohnson: https://github.com/rails/rails/commit/efaa6e4f79d457c2cdd08cbc56d63bc972a6993c
[16:31:54] cjohnson: It seems like this was a bug in how rails interpreted json columns
[16:32:03] cjohnson: Is there any way to know if this fix was back-ported into the 4.2 line?
[16:32:11] woohoou: has joined #RubyOnRails
[16:32:17] cjohnson: Oh :( I just read the whole commit
[16:34:33] cjohnson: Damn that bites
[16:37:58] darkhanb: has joined #RubyOnRails
[16:52:44] ams__: has joined #RubyOnRails
[17:01:11] crankhar1er: has joined #RubyOnRails
[17:02:15] SteenJobs: has joined #RubyOnRails
[17:03:26] cjohnson: I'm writing a concern to fix this in rails 4. In my def self.included, what is the right syntax for calling define_method such that I can define an attr reader/writer on the included class?
[17:03:42] cjohnson: model.define_method json_column do .... ?
[17:08:51] IanMalcolm: has joined #RubyOnRails
[17:22:07] Technodrome: has joined #RubyOnRails
[17:25:03] KeyJoo: has joined #RubyOnRails
[17:26:44] prettybTech: has joined #RubyOnRails
[17:28:31] vedu_: has joined #RubyOnRails
[17:52:09] weaksauce: has joined #RubyOnRails
[17:54:14] IanMalcolm: has joined #RubyOnRails
[18:17:22] Puffball: has joined #RubyOnRails
[18:19:09] Technodrome: has joined #RubyOnRails
[18:26:48] sameerynho: has joined #RubyOnRails
[18:26:48] Alchemical: has joined #RubyOnRails
[18:30:21] tdy: has joined #RubyOnRails
[18:35:10] crankhar1er: has joined #RubyOnRails
[18:36:21] Technodrome: has joined #RubyOnRails
[18:43:24] ivanskie: has joined #RubyOnRails
[18:44:12] prettybTech: has joined #RubyOnRails
[18:50:50] crankhar1er: I'm looking for a gem that can move the I18n key/value data out of files in the app and into some crud-like interface that can allow non-technical folks to manage the translations. Is anyone famililar with something along those lines?
[18:50:54] weird_error: has joined #RubyOnRails
[18:53:23] s2013: has joined #RubyOnRails
[18:53:54] s2013: hello all
[18:57:10] ArTiSTiX: has joined #RubyOnRails
[19:00:03] ivanskie: has joined #RubyOnRails
[19:10:51] Inside: greetings all
[19:19:59] dblessing: has joined #RubyOnRails
[19:21:57] Technodrome: has joined #RubyOnRails
[19:22:26] s2013: hi Inside
[19:27:04] crankhar1er: has joined #RubyOnRails
[19:27:17] ivanskie: has joined #RubyOnRails
[19:36:34] tdy: has joined #RubyOnRails
[19:38:52] markh: has joined #RubyOnRails
[20:01:06] crankhar1er: has joined #RubyOnRails
[20:10:19] moei: has joined #RubyOnRails
[20:17:37] krawchyk: has joined #RubyOnRails
[20:18:53] Inside: So... turbolinks keeps firing 'ready' on every page visit
[20:20:05] Inside: https://gist.github.com/Insood/58439e22484ba2ef23783e365ca95f97
[20:22:16] Inside: I thought ready only fires on the initial page load/
[20:23:36] Inside: yeah im doing that wrong
[20:25:41] Inside: should I attach a timer to each element?
[20:26:32] shenghi: has joined #RubyOnRails
[20:28:07] SteenJobs: has joined #RubyOnRails
[20:33:26] alfiemax: has joined #RubyOnRails
[20:42:04] Puffball: has joined #RubyOnRails
[20:45:16] mlt-: has joined #RubyOnRails
[20:47:04] mlt-: Hello! I'm doing some nasty stuff in Rails, but being a noob I'm curious if it does what I expect it to do. I mean it does work alright. I'm not sure whether it is efficient approach. I'd appreciate a feedback https://gist.github.com/mlt/5988c3c3fd61858d13bd7c25891b9ecf#file-sql_to_csv_streamer-rb
[20:48:18] mlt-: I hope I'm not quite reinventing a wheel
[20:49:11] akaiiro: has joined #RubyOnRails
[20:52:37] poerror: has joined #RubyOnRails
[20:55:56] s2013: has joined #RubyOnRails
[20:56:08] za1b1tsu: has joined #RubyOnRails
[20:59:48] rfoust: has joined #RubyOnRails
[21:03:58] Inside: it looks ok
[21:04:05] Inside: I've never used COPY TO STDOUT before
[21:04:07] Inside: that's a new one for me
[21:04:09] dblessing: has joined #RubyOnRails
[21:04:29] Inside: LOoks like it's postgresql only
[21:04:33] Inside: so you'll have portability issues later
[21:07:45] poerror: has left #RubyOnRails: ("bye-bye")
[21:15:34] neofreak: has joined #RubyOnRails
[21:16:27] neofreak: has left #RubyOnRails: ()
[21:18:18] prettybTech: has joined #RubyOnRails
[21:21:33] quazimodo: has joined #RubyOnRails
[21:25:32] tdy: has joined #RubyOnRails
[21:32:02] ur5us: has joined #RubyOnRails
[21:34:01] mlt-: Inside: Thank you for taking a look! I do use lots of PostgreSQL specifics and that is not an issue for me. I'm more concerned about memory overhead whether this approach is better than fetching everything, formatting into CSV and sending back in one shot.
[21:37:06] mlt-: also I was not sure whether it is okay to toss around a block like that. I just tried and it worked.
[21:38:10] crankhar1er: has joined #RubyOnRails
[21:38:25] apeiros: has joined #RubyOnRails
[21:39:08] apeiros: has joined #RubyOnRails
[22:05:12] s2013: has joined #RubyOnRails
[22:07:42] crankhar1er: has joined #RubyOnRails
[22:08:04] Radar: GOOD MORNING
[22:10:05] Radar: mlt-: Seems to me like you've built the ETL tool all into the one file. May have some maintainability issues in the future.
[22:10:24] Radar: mlt-: Is the intention behind this tool to be a general tool where you can throw in _any_ sql and it'll dump it, or is it for a particular model?
[22:12:41] Radar: ACTION I should probably write up my version of this... hang on.
[22:16:14] arooni: has joined #RubyOnRails
[22:17:31] prettybTech: has joined #RubyOnRails
[22:17:39] Radar: Something like this: https://gist.github.com/radar/7e9573acb5bad4def585774f2ceec345
[22:18:00] Radar: imo it's clearer what this is doing. It's extracting posts from a database and transforming them into CSV. Yours seems pretty generic and I worry about that.
[22:19:21] nickjj_: has joined #RubyOnRails
[22:27:10] s2013: OMG Radar you are alive
[22:27:15] Radar: s2013: rumour has it
[22:27:23] s2013: hows life?
[22:27:29] Radar: the assassins have failed again
[22:28:36] Radar: s2013: Life is good. I'm writing a talk for next week about hiring juniors. Similar line to my RubyConf talk, but for a more senior-heavy audience.
[22:28:42] Radar: s2013: how's your heroku setup going?
[22:28:56] Radar: [15:30:32] s2013: man i keep getting error r14 (memory quote exceeded) even though i have 2 dynos. .and its a basic basic app.. still cant figure out whats wrong
[22:29:00] s2013: where is the talk?
[22:29:03] Radar: Maybe stop exceeding the memory quota.
[22:29:08] s2013: Radar thanks. didnt thikn of that
[22:29:15] s2013: anyways heroku sucks, their support sucks
[22:29:18] Radar: always here to help. You know that.
[22:29:20] s2013: just ended up putting it on a VPS
[22:29:24] havenwood: s2013: The amount of memory doesn't increase when you add dynos. It's memory-per-dyno.
[22:29:39] Radar: s2013: https://www.youtube.com/watch?v=aD6dci9rLXM
[22:31:00] s2013: either way.. it made no sense
[22:31:02] havenwood: Radar: I'm coming to Australia for YOW! in Sydney, Brisbane and Melbourne! Couldn't wait for next years' RubyConf AU.
[22:31:09] s2013: it was a very, very basic app..
[22:31:17] Radar: s2013: talk transcript is here: https://ryanbigg.com/2018/03/hiring-juniors if you prefer reading it.
[22:31:23] s2013: oh very cool. ill check it out
[22:32:04] s2013: where are you working now?
[22:32:25] havenwood: Radar: I'm glad you're talking about the value of juniors. :-D
[22:33:05] Radar: havenwood: yay! Is Yow still happening in December?
[22:33:10] s2013: whats yow?
[22:33:13] s2013: is that the camping thing?
[22:33:24] Radar: s2013: general aussie tech conference
[22:33:29] s2013: oh alright
[22:33:44] havenwood: s2013: I can't make Rails Camp in AU, but I'm going to the one in Yosemite in August.
[22:33:51] s2013: wasnt there some ruby/rails camping thing that used to happen?
[22:34:04] Radar: havenwood: re juniors: Me too :) It's my bread & butter at the moment so I'm a little invested in it. Hoping that the passion I have for it will rub off on others.
[22:34:09] Radar: s2013: yeah, still happens. It's called RailsCamp.
[22:34:20] s2013: never went to one.. but i should go one
[22:34:23] havenwood: s2013: I'll be at this one: https://west.railscamp.us/
[22:34:27] havenwood: s2013: Do it, it's great!
[22:34:30] s2013: let me ceck it out
[22:34:36] s2013: oh damn waitlisted
[22:34:40] s2013: i might be in asia that week tho so
[22:35:42] havenwood: s2013: Camp for adults. Catch one if you can.
[22:35:54] s2013: yeah i definitely want to
[22:36:05] s2013: im going to mexico on an entrepeneur retreat in couple of weeks
[22:36:09] havenwood: s2013: They're ones East and West Coast US, Scotland and Australia afaik.
[22:36:16] s2013: its like the camp one but way more bougie
[22:36:23] havenwood: Lots of Australians at them all!
[22:36:28] s2013: damn aussies
[22:37:12] quazimodo: has joined #RubyOnRails
[22:37:57] s2013: man its sad this channel is < 200 people now.. used to be hundreds and hundreds :(
[22:42:41] havenwood: s2013: a bunch of folk have moved to Slack
[22:42:48] s2013: theres a slack?
[22:42:53] havenwood: s2013: yerp
[22:43:04] s2013: for this specific channel or generic rails one
[22:43:09] havenwood: s2013: https://www.rubyonrails.link/
[22:43:09] s2013: cause i m in one and its pretty dead
[22:43:27] s2013: yeah im on that one
[22:43:51] havenwood: seem busy to me i guess cause i never go in there, so it get spammed when i do
[22:43:52] s2013: its pretty dead compared to how irc was
[22:44:03] havenwood: maybe people figured out how to rails? ;-P
[22:44:10] havenwood: also, lurker count is meh
[22:44:29] s2013: speaking of.. so i didnt write much code for a while but decided to get back into it again cause i missed it
[22:45:14] FernandoBasso: has joined #RubyOnRails
[22:45:14] s2013: so im thinking whats the best way of approaching this.. basically a table that would only have one row.. its kind of like settings,but not really.. there is a settings gem but im not 100% sure that is the best.. this table would also hold like api keys
[22:50:59] nickjj__: has joined #RubyOnRails
[22:56:20] akaiiro: has joined #RubyOnRails
[22:57:53] eGGshke: has joined #RubyOnRails
[22:58:21] gambl0re: has joined #RubyOnRails
[23:06:02] crankhar1er: has joined #RubyOnRails
[23:08:06] mikecmpbll: has joined #RubyOnRails
[23:09:10] wethu: has joined #RubyOnRails
[23:15:38] za1b1tsu: has joined #RubyOnRails
[23:16:02] eckhardt: has joined #RubyOnRails
[23:18:03] cjohnson: How can I monkeypatch a method that is internal to ActiveRecord?
[23:18:15] cjohnson: ActiveRecord::Type::Json::deserialize
[23:18:43] cjohnson: Can I just make an initializer whose contents are module ActiveRecord module Type class Json def deserialize
[23:18:48] cjohnson: and have it merge with teh original class?
[23:19:25] Technodrome: has joined #RubyOnRails
[23:23:49] nickjj: has joined #RubyOnRails
[23:32:01] Cyrus: has joined #RubyOnRails
[23:53:52] dblessing: has joined #RubyOnRails
[23:55:18] nickjj_: has joined #RubyOnRails