Last active
December 11, 2015 20:19
-
-
Save timoschilling/4654746 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class D | |
| def macro | |
| :referenced_in | |
| end | |
| def foreign_key | |
| "listimage_asset_id" | |
| end | |
| def eager_load ids | |
| ids = ids.dup | |
| ids.compact! | |
| ids = ids.map { |id| Vrame::AssetBase.decrop_id id } | |
| ids.uniq! | |
| puts ids | |
| Asset.find ids | |
| end | |
| end | |
| x = Event.limit(5) | |
| x.inclusions << d = D.new | |
| x.to_a; nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment