It would be cool, to have a praedicate to check if a column is in a state, like: is_update_successfull?
Code to use here:
states
|> Enum.each(fn(state) ->
def unquote(:"is_#{column}_#{state}?")(model) do
:"#{Map.get(model, unquote(column))}" == unquote(state)
end
end)
It would be cool, to have a praedicate to check if a column is in a state, like:
is_update_successfull?Code to use here: