Hi, i have macro:
defmacro from_db(var1) do
code = MyApp.get_code_from_db |> Code.eval_string
# the string code from db field is : "if 1 < 2 do IO.inspect var1 end"
quote do
unquote(code) #but doesn't work
end
end
How to make it works ? It means how to “unqoute” var1 which is inside string code taken from DB. ?
Thanks in advance .