Is there some strong rationale behind this choice? I mean something like “that’s the right place for it because […]” Or was it more like “there is no right place for it so it might just sit along with the controllers”?
Doesn’t it put it under
/controllers/<context_name>/user_auth.ex? In that case I wouldn’t consider it as “into controllers” but as a “private” helper module for
Hm… Now I don’t recall how exactly I invoked the generator (and history’s no longer valid) but what I got is:
It puts it in controllers/user_auth.ex indeed. Those are exclusively controller helpers, so that’s the directory it should go to.
If it would be inline with the one existing helper module (
views/error_helpers.ex) then it would be
IMHO too that would be more consistent and understandable. Not that it’s a huge deal but a bit more consistent conventions around Phoenix wouldn’t hurt (again IMHO, while still having relatively fresh eye on it).
I felt the same personally, so I pulled helpers out to a separate directory