-
-
Save paulcsmith/63a729638b52899db57dc8c886cdee0c to your computer and use it in GitHub Desktop.
This file contains 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
# https://carc.in/#/r/1dny | |
class User | |
FIELDS = [:stuff] | |
end | |
class Changeset | |
macro setup(model_class) | |
{{ model_class::FIELDS}} # Results in "Unexpected token: ::" | |
# If I use the actual constant it works | |
# {{ User::FIELDS }} | |
end | |
end | |
Changeset.setup(User) # Should return [:stuff] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment