elixir-maru / maru

Elixir RESTful Framework
https://maru.readme.io
BSD 3-Clause "New" or "Revised" License
1.32k stars 85 forks source link

Import macros defined in helpers #45

Closed oivoodoo closed 7 years ago

falood commented 7 years ago

Hi @oivoodoo Thank you for the pr. I merged this because I agree a module should be imported when it is used as a helper. But I think we should use a better example. When I use ruby, I use current_user! for authorization, but in elixir 1.4, I have to use current_user!(). Just like https://github.com/elixir-maru/maru/commit/390ebb0e196cfa3516e28991f704a5f54dc85af5, it looks strange, and it's an unhygienic macro.

oivoodoo commented 7 years ago

Hi @falood . I agree with you about the syntax that it would be great to have the calls without (). But probably it could be good to have proposal for elixir like in python @property to mark somehow the macros as property.

Thanks for maru :) I am really happy to use it for making prototypes for API.