These are chat archives for ManageIQ/manageiq/performance

12th
Apr 2016
Keenan Brock
@kbrock
Apr 12 2016 15:54
@matthewd what is collection_join_chain?
can I ask an association are your virtual?
3rd how can you ask an association what is the source klass?
so I can get self.parent_klass.association_virtual?(self.name) -- to generate above method
Matthew Draper
@matthewd
Apr 12 2016 15:55
Is the first one a trick question? :confused:
Keenan Brock
@kbrock
Apr 12 2016 15:56
1st one - I want to take a list of association names, and generate the associations
can I do that with this method?
Matthew Draper
@matthewd
Apr 12 2016 15:57
collection_join_chain doesn't exist in Rails, in MIQ, or in Google
Keenan Brock
@kbrock
Apr 12 2016 16:02
aah
collect_join_chain
Matthew Draper
@matthewd
Apr 12 2016 16:06
Okay, that at least exists ;)
Keenan Brock
@kbrock
Apr 12 2016 16:07
lol
Matthew Draper
@matthewd
Apr 12 2016 16:07
But the chain of questioning feels awfully XY
Keenan Brock
@kbrock
Apr 12 2016 16:07
+1
I want to say, given a string ("." delimited), please give the the associations in that chain?
/cc @imtayadeway
Matthew Draper
@matthewd
Apr 12 2016 16:10
So, a smarter take on str.split('.').inject(self) {|klass, name| klass.reflect_on_association(name).klass } ?
Keenan Brock
@kbrock
Apr 12 2016 19:58
@matthewd whoa - that last round was very hard fought ==> ManageIQ/manageiq#7813