micahbf

Activity Graph

Page 1 of 1

2016-05-26

[00:33:12] micahbf: Remote host closed the connection
[00:33:29] micahbf: has joined #RubyOnRails
[01:04:36] micahbf: Ping timeout: 276 seconds

2016-05-25

[18:16:16] micahbf: has joined #RubyOnRails
[18:18:23] micahbf: ACTION msg NickServ REGISTER f1d3lity micahbuckleyfarlee@gmail.com
[18:18:51] micahbf: using a new irc client :)
[18:19:05] micahbf: does anyone know if there is a way to extend an already defined association?
[18:20:15] micahbf: @hazelux you're going to want to do a self join
[18:24:39] micahbf: /msg NickServ VERIFY REGISTER micahbf utjrmrhkqadn
[18:33:49] micahbf: @hazelux i didn't initially see the parameterization and distance calculation, which adds some complexity, but the idea would be to self join on title, which will only return (exact) dups from the database
[18:37:58] micahbf: @hazelux I think you probably want to do as much db-side as possible
[18:38:21] micahbf: If you're using postgres, it some some string similarity stuff
[18:40:22] micahbf: Check out the pg_similarity extension
[18:43:23] micahbf: @hazelux good luck! one thing is if you use some other algorithm for string similarity that doesn't do comparison, but just comes up with some simplified version, then you only need one iteration
[18:43:38] micahbf: like converting all of the titles to soundex or something
[18:43:45] micahbf: then you can just hash them
[18:45:22] micahbf: totally depends on use case, but for example see soundex https://en.wikipedia.org/wiki/Soundex
[18:45:49] micahbf: the idea is that you would loop through once, indexing by soundex, then if you already have something indexed for the same soundex key, you have a dup
[18:46:17] micahbf: what sort of dups are you seeing that you need the jaro-winkler distance checking?
[19:26:12] micahbf: @hazelux what do the non-exact dups tend to look like?
[20:41:09] micahbf: Does anyone know how I could extend an already defined association?
[20:41:19] micahbf: Specifically trying to add some functionality to papertrail versions
[20:41:32] micahbf: Can I just open up x.versions.class?
[20:41:40] micahbf: in this case ActiveRecord::Associations::CollectionProxy::ActiveRecord_Associations_CollectionProxy_PaperTrail_Version
[20:42:47] micahbf: I don't know how persistent those dynamically generated proxy classes are
[20:47:19] micahbf: nor for that matter if I have access to proxy_association if I just open up the class
[20:47:56] micahbf: confirmed: I don't
[22:03:35] micahbf: Ping timeout: 250 seconds
[23:17:04] micahbf: has joined #RubyOnRails
[23:24:33] micahbf: Ping timeout: 240 seconds
[23:42:22] micahbf: has joined #RubyOnRails