« Back to channel list

#RubyOnRails - 04 July 2019

« Back 1 day Forward 1 day »
[00:40:07] emptyfl4sk: has joined #RubyOnRails
[00:41:43] armyriad: has joined #RubyOnRails
[00:44:16] s00pcan__: has joined #RubyOnRails
[00:56:51] Technodrome: has joined #RubyOnRails
[01:00:02] Galaxies: has joined #RubyOnRails
[01:00:31] orbyt_: has joined #RubyOnRails
[01:19:42] Haydos: has joined #RubyOnRails
[01:39:26] hive-mind: has joined #RubyOnRails
[01:42:18] emptyfl4sk: has joined #RubyOnRails
[01:54:44] DTZUZO: has joined #RubyOnRails
[01:59:33] ur5us: has joined #RubyOnRails
[02:27:37] s00pcan: has joined #RubyOnRails
[02:34:02] Tempesta: has joined #RubyOnRails
[02:36:02] srinidhi: has joined #RubyOnRails
[02:37:03] duderonomy: has joined #RubyOnRails
[02:40:53] duderonomy: has joined #RubyOnRails
[02:49:37] lato_1: has joined #RubyOnRails
[02:51:32] duderonomy: has joined #RubyOnRails
[02:58:34] maryo: has joined #RubyOnRails
[02:59:58] kurly: has joined #RubyOnRails
[03:09:49] braincrash: has joined #RubyOnRails
[04:01:50] emptyfl4sk: has joined #RubyOnRails
[04:23:00] srinidhi: has joined #RubyOnRails
[04:57:27] alxgsv: has joined #RubyOnRails
[05:00:04] sandstrom: has joined #RubyOnRails
[05:08:48] tdy: has joined #RubyOnRails
[05:21:08] srinidhi: has joined #RubyOnRails
[05:24:55] conta: has joined #RubyOnRails
[05:38:57] srinidhi: has joined #RubyOnRails
[05:43:42] lankanmon: has joined #RubyOnRails
[05:50:02] schne1der: has joined #RubyOnRails
[06:23:18] emptyfl4sk: has joined #RubyOnRails
[06:29:21] kurly: has joined #RubyOnRails
[06:41:56] lxsameer: has joined #RubyOnRails
[06:43:01] jhass: has joined #RubyOnRails
[07:15:20] morozovm: has joined #RubyOnRails
[07:24:29] schne1der: has joined #RubyOnRails
[07:34:10] sandstrom: has joined #RubyOnRails
[08:06:40] mikecmpbll: has joined #RubyOnRails
[08:12:32] Ergo: has joined #RubyOnRails
[08:17:04] deepreds1: has joined #RubyOnRails
[08:22:54] jefffrails35: has joined #RubyOnRails
[08:24:12] emptyfl4sk: has joined #RubyOnRails
[08:31:57] keden: has joined #RubyOnRails
[09:10:21] DTZUZO: has joined #RubyOnRails
[09:11:15] thesubr00t: has joined #RubyOnRails
[09:13:14] thesubr00t: Hi ! I'm trying to build a simple Ruby app that has classe's with relationships based on 'foreign key' style without the use of database. I thought about creating a data object that will contain all the instance of other models.
[09:13:28] thesubr00t: What is the best approach to achieve this ?
[10:12:59] tdy1: has joined #RubyOnRails
[10:25:11] emptyfl4sk: has joined #RubyOnRails
[10:29:42] tdy2: has joined #RubyOnRails
[10:30:49] keden: has joined #RubyOnRails
[11:00:34] alxgsv: has joined #RubyOnRails
[11:02:04] lankanmon: has joined #RubyOnRails
[11:09:37] hammer065: has joined #RubyOnRails
[11:16:31] ZAJDAN: has joined #RubyOnRails
[11:28:02] DTZUZO: has joined #RubyOnRails
[11:33:52] gb_away: has joined #RubyOnRails
[11:39:56] crankharder: has joined #RubyOnRails
[11:54:28] cassolas: has joined #RubyOnRails
[12:26:09] emptyfl4sk: has joined #RubyOnRails
[12:44:06] LiamW: has joined #RubyOnRails
[12:44:53] LiamW: is there a better way to access the join table of a habtm relationship than using reflect_on_association
[12:47:00] LiamW: my join table doesn't have any extra attributes besides the association ids, I just need to alias one side of the relationship into another and don't want to drop to sql just yet if I can avoid it
[12:47:17] LiamW: would like to use upsert_all here
[12:57:18] LiamW: I found classes like this in objectspace User::HABTM_WatchedTags
[12:57:24] LiamW: but cannot seem to access them
[13:02:29] Saukk: has joined #RubyOnRails
[13:05:11] LiamW: apparently it's a private_constant
[13:05:13] LiamW: argh, why
[13:05:26] NL3limin4t0r: LiamW: The question is, why do you need to access the join table if there is no additional attributes in them?
[13:05:52] LiamW: because I don't want to load every single association model into memory?
[13:05:55] LiamW: I just want to do a bulk insert
[13:06:36] LiamW: insert into user_tag_watches select user_id, #{target_tag.id} from user_tag_watches on conflict do nothing;
[13:06:46] LiamW: equivalent to that
[13:07:46] LiamW: I already monkeypatched ActiveRecord::Base to actually allow you to do insert into ... select ... in the first place because that wasn't there at all before
[13:07:50] NL3limin4t0r: The best option might be to add an model for the join table. Then replace the has_and_belongs_to_many relationship with has_many ..., though: ...
[13:07:58] LiamW: yeah I tried that
[13:08:15] LiamW: what I ended up with was a ton of duplicate associations being returned out of the association
[13:08:34] LiamW: duplicate rows, rather
[13:08:55] LiamW: which should be impossible, because I have a composite unique constraint on the join table
[13:09:04] LiamW: but somehow activerecord managed to do it
[13:09:22] LiamW: it turned 15 rows into 225 rows
[13:09:54] NL3limin4t0r: There might be an issue with your query then.
[13:09:58] LiamW: there was not
[13:12:11] LiamW: here is EXACTLY what I did: https://gist.github.com/liamwhite/b244047b1166a87c8ed6752df559b1bd
[13:14:16] NL3limin4t0r: That doesn't seem like it should generate duplicated tag names.
[13:14:27] NL3limin4t0r: And there are no duplicate entries in the database?
[13:14:33] LiamW: there are not
[13:15:44] lankanmon: has joined #RubyOnRails
[13:16:28] NL3limin4t0r: Have you looked at the SQL query generated?
[13:17:29] LiamW: https://gist.githubusercontent.com/liamwhite/b244047b1166a87c8ed6752df559b1bd/raw/d0b1977d3d4c1c35d4ca36c25bdc60f4fad81bf8/query.txt
[13:17:31] LiamW: looks like this
[13:22:04] kurko_: has joined #RubyOnRails
[13:28:42] NL3limin4t0r: Hmm, that also looks like it shouldn't produce duplicate results.
[13:35:02] crankharder: has joined #RubyOnRails
[13:38:50] LiamW: NL3limin4t0r: just tried HMT again and got this https://gist.githubusercontent.com/liamwhite/b244047b1166a87c8ed6752df559b1bd/raw/b79ab220fd07b9a9503049058caa06ac30abf56f/query2.txt
[13:40:11] crankharder: has joined #RubyOnRails
[13:41:44] dionysus69: has joined #RubyOnRails
[13:43:19] NL3limin4t0r: That's indeed a somewhat strange query, but still shouldn't produce duplicates. Have you already restarted your console/server ?
[13:45:08] NL3limin4t0r: btw I assumed that this is about the User#watched_tag_list method.
[13:46:26] LiamW: I have to go for now, be back later probably
[13:46:35] LiamW: has left #RubyOnRails: ("WeeChat 2.3")
[13:46:57] Andr3as: has joined #RubyOnRails
[14:13:36] Dbugger: has joined #RubyOnRails
[14:15:29] emptyfl4sk: has joined #RubyOnRails
[14:30:17] renegadeandy: has joined #RubyOnRails
[14:30:47] renegadeandy: Hi all. With regards to image classification from a rails app, do you think this still applies : https://www.netguru.com/blog/ruby-on-rails-in-machine-learning-yay-or-nay
[14:31:13] ur5us: has joined #RubyOnRails
[14:31:19] asprillia: has joined #RubyOnRails
[15:02:03] crankharder: has joined #RubyOnRails
[15:06:12] DTZUZO: has joined #RubyOnRails
[15:35:24] kurko__: has joined #RubyOnRails
[15:44:53] voker57: has joined #RubyOnRails
[15:49:12] gambl0r3: has joined #RubyOnRails
[15:55:10] voker57: has joined #RubyOnRails
[16:00:16] TvL2386: has joined #RubyOnRails
[16:08:10] srinidhi: has joined #RubyOnRails
[16:13:32] uranoss: has joined #RubyOnRails
[16:33:39] orbyt_: has joined #RubyOnRails
[16:36:17] dviola: has joined #RubyOnRails
[16:45:40] emptyfl4sk: has joined #RubyOnRails
[16:46:27] sandstrom: has joined #RubyOnRails
[16:48:33] Ropeney: has joined #RubyOnRails
[16:55:57] ellcs: has joined #RubyOnRails
[17:16:45] alxgsv: has joined #RubyOnRails
[17:21:50] deepreds1: has joined #RubyOnRails
[17:29:41] uks: has joined #RubyOnRails
[17:47:11] emptyfl4sk: has joined #RubyOnRails
[17:50:20] gambl0r3: has joined #RubyOnRails
[18:14:59] MrCrackPot: has joined #RubyOnRails
[18:21:20] schne1der: has joined #RubyOnRails
[18:29:47] srinidhi: has joined #RubyOnRails
[18:46:03] armyriad: has joined #RubyOnRails
[19:00:15] MrCrackPotBuilde: has joined #RubyOnRails
[19:06:21] NeXTSUN: has joined #RubyOnRails
[20:08:50] emptyfl4sk: has joined #RubyOnRails
[20:30:56] ascarter: has joined #RubyOnRails
[20:32:21] ascarter: has joined #RubyOnRails
[20:35:56] ascarter: has joined #RubyOnRails
[20:45:37] emptyfl4sk: has joined #RubyOnRails
[21:03:21] ascarter: has joined #RubyOnRails
[21:08:27] shirak: has joined #RubyOnRails
[21:18:24] deepredsky: has joined #RubyOnRails
[21:20:13] emptyfl4sk: has joined #RubyOnRails
[21:22:58] ur5us: has joined #RubyOnRails
[21:37:23] unreal: has joined #RubyOnRails
[21:51:38] gambl0r3: has joined #RubyOnRails
[22:11:12] emptyfl4sk: has joined #RubyOnRails
[22:14:54] tdy3: has joined #RubyOnRails
[22:45:42] emptyfl4sk: has joined #RubyOnRails
[22:48:34] MrCrackPotBuilde: has joined #RubyOnRails
[23:20:51] webdestroya: has joined #RubyOnRails
[23:34:55] brool: has joined #RubyOnRails
[23:42:39] DTZUZO: has joined #RubyOnRails