« Back to channel list

#RubyOnRails - 05 May 2019

« Back 1 day Forward 1 day »
[00:02:58] jottr: has joined #RubyOnRails
[00:13:12] jottr: has joined #RubyOnRails
[00:23:10] s00pcan: has joined #RubyOnRails
[00:23:25] jottr: has joined #RubyOnRails
[00:23:56] orbyt_: has joined #RubyOnRails
[00:25:18] weteamsteve2: Hey is anybody around?
[00:26:29] weteamsteve2: I'm new to ruby on rails. I'm trying to setup a migration for having an 'owner' of a 'squad' (like a leader of a team, or manager of a team). Is 'rails g migration add_owner_to_squads owner:references
[00:26:29] weteamsteve2: ' a good way of doing this? can I reference a 'user' this way? then I will query all 'member' table to see who is a member of this team
[00:33:39] jottr: has joined #RubyOnRails
[00:43:53] jottr: has joined #RubyOnRails
[00:54:04] jottr: has joined #RubyOnRails
[01:01:04] ElF3rn4: has joined #RubyOnRails
[01:04:18] jottr: has joined #RubyOnRails
[01:11:36] orbyt_: has joined #RubyOnRails
[01:14:31] jottr: has joined #RubyOnRails
[01:24:43] jottr: has joined #RubyOnRails
[01:27:19] orbyt_: has joined #RubyOnRails
[01:27:20] tdy: has joined #RubyOnRails
[01:34:58] jottr: has joined #RubyOnRails
[01:45:11] jottr: has joined #RubyOnRails
[01:47:56] Nickcon: has joined #RubyOnRails
[01:55:22] jottr: has joined #RubyOnRails
[01:57:30] Nickcon: I have a quick question about best practices with a rails json api. Anyone available to discuss?
[02:05:36] jottr: has joined #RubyOnRails
[02:15:49] jottr: has joined #RubyOnRails
[02:26:01] jottr: has joined #RubyOnRails
[02:36:16] jottr: has joined #RubyOnRails
[02:37:21] pd09041999: has joined #RubyOnRails
[02:46:30] jottr: has joined #RubyOnRails
[02:56:40] jottr: has joined #RubyOnRails
[02:58:59] masquino: has joined #RubyOnRails
[03:00:18] masquino: hey everyone! quick uqestion, how can I configure my api to take, for example, the user json on the root of the request body rather than requiring the `user` key in it when POSTing a user?
[03:06:53] jottr: has joined #RubyOnRails
[03:11:50] braincrash: has joined #RubyOnRails
[03:17:06] jottr: has joined #RubyOnRails
[03:28:17] jottr: has joined #RubyOnRails
[03:55:38] bga57: has joined #RubyOnRails
[03:56:49] pd09041999: has joined #RubyOnRails
[04:00:34] jottr: has joined #RubyOnRails
[04:01:13] pd09041999: has joined #RubyOnRails
[04:07:15] Milos: has joined #RubyOnRails
[04:20:33] Saukk: has joined #RubyOnRails
[04:22:28] Milos: has joined #RubyOnRails
[04:45:31] haengma: has joined #RubyOnRails
[05:18:20] pd09041999: has joined #RubyOnRails
[06:00:41] jottr: has joined #RubyOnRails
[06:24:19] jottr: has joined #RubyOnRails
[07:07:08] pd09041999: has joined #RubyOnRails
[07:19:26] jottr: has joined #RubyOnRails
[07:32:53] jarray52: has joined #RubyOnRails
[07:38:28] jottr: has joined #RubyOnRails
[07:39:58] jarray52: Are there any gems such as db-query-matchers that allow rspec tests to count the number of “bundled database queries”? By “bundled database queries”, I mean transactions and any other group of transactions that is done in one round trip to the database. I’m trying to count the number of database round trips within api endpoints.
[07:48:42] jottr: has joined #RubyOnRails
[07:58:53] jottr: has joined #RubyOnRails
[08:09:08] jottr: has joined #RubyOnRails
[08:18:51] ellcs: has joined #RubyOnRails
[08:19:20] jottr: has joined #RubyOnRails
[08:21:15] lxsameer: has joined #RubyOnRails
[08:29:38] jottr: has joined #RubyOnRails
[08:39:50] jottr: has joined #RubyOnRails
[08:45:58] haengma: has joined #RubyOnRails
[08:50:03] jottr: has joined #RubyOnRails
[08:52:40] jarray52: has left #RubyOnRails: ()
[09:00:17] jottr: has joined #RubyOnRails
[09:10:30] jottr: has joined #RubyOnRails
[09:20:44] jottr: has joined #RubyOnRails
[09:30:02] haengma: has joined #RubyOnRails
[09:30:57] jottr: has joined #RubyOnRails
[09:41:12] jottr: has joined #RubyOnRails
[09:43:19] old_relik: has joined #RubyOnRails
[09:43:42] old_relik: how do I group records by it's parent id in a single query?
[09:44:10] old_relik: Model.group(:parent_id) doesn't work
[09:44:51] old_relik: I want something like: {"c25c67c7-f7f1-43a0-88d0-059f5c591e64" => [children objects], "001b09bb-daf5-48fa-8f3f-5f423ce9e319" => [children objects]}
[09:45:00] old_relik: without using group_by
[09:51:23] jottr: has joined #RubyOnRails
[10:01:35] jottr: has joined #RubyOnRails
[10:05:15] ellcs: has joined #RubyOnRails
[10:10:09] Dbugger: has joined #RubyOnRails
[10:11:50] jottr: has joined #RubyOnRails
[10:22:03] jottr: has joined #RubyOnRails
[10:32:15] jottr: has joined #RubyOnRails
[10:42:27] jottr: has joined #RubyOnRails
[10:47:37] retro|cz: has joined #RubyOnRails
[10:52:40] jottr: has joined #RubyOnRails
[10:55:22] lankanmon: has joined #RubyOnRails
[11:02:54] jottr: has joined #RubyOnRails
[11:07:06] apparition: has joined #RubyOnRails
[11:08:38] ellcs: has joined #RubyOnRails
[11:13:08] jottr: has joined #RubyOnRails
[11:23:19] jottr: has joined #RubyOnRails
[11:33:34] jottr: has joined #RubyOnRails
[11:43:45] jottr: has joined #RubyOnRails
[11:53:59] jottr: has joined #RubyOnRails
[12:04:11] jottr: has joined #RubyOnRails
[12:14:24] jottr: has joined #RubyOnRails
[12:24:39] jottr: has joined #RubyOnRails
[12:34:52] jottr: has joined #RubyOnRails
[12:36:23] zmo: hi 👋 I got a special need for TDD using VCR: I'm building a bunch of model instances with my factories, I then push those instances (using their ids) to an external service using a POST request, and then that service does its magic (which takes time), and returns me useful output using the pushed Ids through a GET request. My issue is that when I record the first time around, it stores the ids of the
[12:36:25] zmo: data from the POST, and when I do the GET it returns me the old models IDs. I'm looking for some documentation that would tell me how I can use ERB in the VCR cassette to refer the pushed IDs in the first request so I can give it back in the second
[12:36:59] zmo: and I'm trying googling and looking up on SO, but no luck trying to find the right question…
[12:37:07] zmo: (and I'm looking at the VCR docs too)
[12:45:06] jottr: has joined #RubyOnRails
[12:45:15] retro|cz: has joined #RubyOnRails
[12:55:19] jottr: has joined #RubyOnRails
[12:56:14] uranoss: has joined #RubyOnRails
[13:04:24] mikecmpbll: has joined #RubyOnRails
[13:05:32] jottr: has joined #RubyOnRails
[13:15:44] jottr: has joined #RubyOnRails
[13:25:58] jottr: has joined #RubyOnRails
[13:36:11] jottr: has joined #RubyOnRails
[13:37:05] zmo: or as an alternative, I thought I could stub the UUID generation of activerecord so values generated are predictable (using some generator). It's easy to stub SecureRandom, but still not finding how to stub activerecord's (which I guess does nothing and rely on postgresql's uuid function)
[13:40:55] conta: has joined #RubyOnRails
[13:46:30] jottr: has joined #RubyOnRails
[13:53:03] zacts: has joined #RubyOnRails
[13:57:06] DTZUZO: has joined #RubyOnRails
[14:04:36] lato: has joined #RubyOnRails
[14:05:22] jottr: has joined #RubyOnRails
[14:13:01] quazimodo: has joined #RubyOnRails
[14:15:36] jottr: has joined #RubyOnRails
[14:25:04] uksio: has joined #RubyOnRails
[14:25:49] jottr: has joined #RubyOnRails
[14:36:03] jottr: has joined #RubyOnRails
[14:49:43] defsdoor: has joined #RubyOnRails
[14:54:23] jottr: has joined #RubyOnRails
[15:02:47] Technodrome: has joined #RubyOnRails
[15:04:38] jottr: has joined #RubyOnRails
[15:12:01] pd09041999: has joined #RubyOnRails
[15:15:50] jottr: has joined #RubyOnRails
[15:26:02] jottr: has joined #RubyOnRails
[15:36:15] jottr: has joined #RubyOnRails
[15:45:22] tdy: has joined #RubyOnRails
[15:46:30] jottr: has joined #RubyOnRails
[15:50:37] zacts: has joined #RubyOnRails
[15:56:44] jottr: has joined #RubyOnRails
[15:59:03] Saukk: has joined #RubyOnRails
[16:01:31] hightower2: has joined #RubyOnRails
[16:06:54] jottr: has joined #RubyOnRails
[16:12:43] zmo: ok, found the quick and dirty solution that works for me : I'm stubbing AR new/create and merge id with a stubbed SecureRandom uuid that generates UUID in sequence
[16:16:13] blackmesa: has joined #RubyOnRails
[16:17:07] jottr: has joined #RubyOnRails
[16:27:21] jottr: has joined #RubyOnRails
[16:31:51] mikecmpbll: has joined #RubyOnRails
[16:37:33] jottr: has joined #RubyOnRails
[16:37:33] GodFather: has joined #RubyOnRails
[16:47:46] jottr: has joined #RubyOnRails
[16:53:34] Technodrome: has joined #RubyOnRails
[16:55:41] al-damiri: has joined #RubyOnRails
[16:58:01] jottr: has joined #RubyOnRails
[17:02:23] srinidhi: has joined #RubyOnRails
[17:08:12] jottr: has joined #RubyOnRails
[17:10:36] pd09041999: has joined #RubyOnRails
[17:14:28] pd09041999: has joined #RubyOnRails
[17:18:51] jottr: has joined #RubyOnRails
[17:19:38] pd09041999: has joined #RubyOnRails
[17:28:52] pd09041999: has joined #RubyOnRails
[17:29:49] jottr: has joined #RubyOnRails
[17:35:15] jottr: has joined #RubyOnRails
[17:43:34] blackmesa: has joined #RubyOnRails
[17:46:14] jottr: has joined #RubyOnRails
[17:49:10] pd09041999: has joined #RubyOnRails
[17:53:00] tdy: has joined #RubyOnRails
[17:57:13] jottr: has joined #RubyOnRails
[18:08:12] jottr: has joined #RubyOnRails
[18:14:58] gambl0re: has joined #RubyOnRails
[18:19:11] jottr: has joined #RubyOnRails
[18:22:32] pd09041999: has joined #RubyOnRails
[18:23:19] Dbugger: has joined #RubyOnRails
[18:26:22] pd09041999: has joined #RubyOnRails
[18:30:08] jottr: has joined #RubyOnRails
[18:33:58] orbyt_: has joined #RubyOnRails
[18:40:47] jottr: has joined #RubyOnRails
[18:58:15] jottr: has joined #RubyOnRails
[19:02:35] ariedler: has joined #RubyOnRails
[19:03:21] pd09041999: has joined #RubyOnRails
[19:07:14] jottr: has joined #RubyOnRails
[19:18:13] jottr: has joined #RubyOnRails
[19:27:28] jottr: has joined #RubyOnRails
[19:38:07] jottr: has joined #RubyOnRails
[19:59:54] jottr: has joined #RubyOnRails
[20:10:15] jottr: has joined #RubyOnRails
[20:16:35] blackmesa: has joined #RubyOnRails
[20:17:07] orbyt_: has joined #RubyOnRails
[20:20:19] jottr: has joined #RubyOnRails
[20:30:32] jottr: has joined #RubyOnRails
[20:40:01] zacts: has joined #RubyOnRails
[20:40:45] jottr: has joined #RubyOnRails
[20:47:04] ellcs: has joined #RubyOnRails
[20:50:58] jottr: has joined #RubyOnRails
[21:01:11] jottr: has joined #RubyOnRails
[21:03:53] ariedler: has joined #RubyOnRails
[21:11:25] jottr: has joined #RubyOnRails
[21:14:42] ur5us: has joined #RubyOnRails
[21:21:36] jottr: has joined #RubyOnRails
[21:31:49] jottr: has joined #RubyOnRails
[21:42:02] jottr: has joined #RubyOnRails
[21:52:15] jottr: has joined #RubyOnRails
[22:02:29] jottr: has joined #RubyOnRails
[22:04:26] orbyt_: has joined #RubyOnRails
[22:12:43] jottr: has joined #RubyOnRails
[22:22:56] jottr: has joined #RubyOnRails
[22:30:08] dustinm`: has joined #RubyOnRails
[22:40:53] jottr: has joined #RubyOnRails
[22:51:05] jottr: has joined #RubyOnRails
[23:00:30] jottr: has joined #RubyOnRails
[23:04:48] ariedler: has joined #RubyOnRails
[23:12:57] jottr: has joined #RubyOnRails
[23:23:10] jottr: has joined #RubyOnRails
[23:24:05] uks: has joined #RubyOnRails
[23:33:23] jottr: has joined #RubyOnRails
[23:40:43] orbyt_: has joined #RubyOnRails
[23:43:36] jottr: has joined #RubyOnRails
[23:53:47] jottr: has joined #RubyOnRails