"We need to go deeper"
submitted by gsoto
https://reddit.com/r/ProgrammerHumor/comments/vm3ksz/we_need_to_go_deeper/
While that one cures, I added the trench run and got capacitive touch working in the studs.
I've made an alternative frontend to Medium:
If you, like me, are occasionally forced to read articles on medium.com, now you can read them on Scribe instead! Feedback welcome.
The last Saskatchewan Pirate: https://www.youtube.com/watch?v=MHvqBVby_io
TLDR I’m looping through a list of all potential association names, using the Reflection API to find one that actually exists, then using private information to get the type of the association, finally creating it the appropriate method.
With comments noting the dodgy bit.
ActiveRecord has a public Reflection API that lets you give you info about scopes/associations, but every class returned is private. One of the few allowed methods is `name` that just gives back what you put in 😡
Outlet.reflect_on_association(:instructors).name == :instructors