<     May 2017     >
Su Mo Tu We Th Fr Sa  
    1  2  3  4  5  6  
 7  8  9 10 11 12 13  
14 15 16 17 18 19 20  
21 22 23 24 25 26 27  
28 29 30 31
03:59 tercenya joined
06:35 ineb joined
08:28 GitHub113 joined
08:28 <GitHub113> [13sequel] 15phyrog opened issue #1364: Using class_table_inheritance with alias sets wrong table_name 02https://git.io/vHLBZ
08:28 GitHub113 left
08:51 Morrolan joined
12:12 ta_ joined
13:54 banditron joined
14:44 GitHub23 joined
14:44 <GitHub23> [13sequel] 15jeremyevans closed issue #1364: Using class_table_inheritance with alias sets wrong table_name 02https://git.io/vHLBZ
14:44 GitHub23 left
14:44 GitHub126 joined
14:44 <GitHub126> [13sequel] 15jeremyevans commented on issue #1364: It is expected when using the `:alias` option that the table name will be the same, because the subquery alias remains the same. Sequel doesn't ship with a `have_column` rspec matcher, but you should probably contact the maintainer of that code and let them know they need to update the code if they want it to work with the class_table_inheritance :alias option. 02https://git.io/vHtZ0
14:44 GitHub126 left
16:08 ineb joined
17:17 ta_ joined
18:13 tercenya joined
18:37 tercenya joined
18:41 Renich joined
19:15 Renich_ joined
19:47 tercenya joined
21:06 <eydaimon> jeremyevans: http://sequel.jeremyevans.net/rdoc/files/doc/association_basics_rdoc.html#label-add_association regarding this, it would be nice if there was a shortcut like find_or_create where it doesn't add it if the association exists already
21:07 <jeremyevans> eydaimon: You can add such a method yourself, but I don't think it makes sense to add one by default for all associations
21:08 <eydaimon> jeremyevans: the snag I hit was testing to see if they existed. Took me a bit to figure out how to check for it. model.things.find(key: 'blah').first returns an error
21:09 <eydaimon> if there's no such association already
21:09 <eydaimon> I ended up using include? to check for it
21:09 <eydaimon> but maybe it's just because it's been awhile since I used sequel :)
21:10 <jeremyevans> eydaimon: A better approach would be: model.add_thing(thing) if model.things_dataset.where(:id=>thing.id).empty?
21:10 <eydaimon> thanks :)
22:50 tercenya joined