Closed jalcine closed 6 years ago
Thanks @jalcine but there's a compile warning about it, could you also fix it?
Compiling 56 files (.ex)
warning: definitions with multiple clauses and default values require a header. Instead of:
def foo(:first_clause, b \\ :default) do ... end
def foo(:second_clause, b) do ... end
one should write:
def foo(a, b \\ :default)
def foo(:first_clause, b) do ... end
def foo(:second_clause, b) do ... end
def redirect/3 has multiple clauses and defines defaults in one or more clauses
lib/maru/response.ex:27
Hmm. I'm using 1.6, didn't get this. Lemme check it out.
it's a compile warning, run mix clean
and you'll see it when recompile 🙂
Pushed up that fix.
thanks @jalcine
I tend to do a lot of URI validation when I'm handling redirects. This change allows you to pass in a URI to use for redirecting. It's a bit more semantically correct (and helps with a bit of type-checking).