You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
can someone explain what is the idea behind having this on formatter.ex?
defimplBamboo.Formatter,for: Mapdodefformat_email_address(invalid_address,_opts)doraiseArgumentError,""" The format of the address was invalid. Got #{inspect(invalid_address)}. Expected a string, e.g. "foo@bar.com", a 2 item tuple {name, address}, or something that implements the Bamboo.Formatter protocol. Example: defimpl Bamboo.Formatter, for: MyApp.User do def format_email_address(user, _opts) do {user.name, user.email} end end """endend
This introduces warnings and duplicated modules errors and it seems like it isn't doing anything that a non-existing defimpl would warn/error by itself?
Other than that, how can I create an implementation for the Map type?
The text was updated successfully, but these errors were encountered:
Hi,
can someone explain what is the idea behind having this on
formatter.ex
?This introduces warnings and duplicated modules errors and it seems like it isn't doing anything that a non-existing
defimpl
would warn/error by itself?Other than that, how can I create an implementation for the
Map
type?The text was updated successfully, but these errors were encountered: