Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config routes and path helpers #317

Open
International opened this issue Dec 14, 2017 · 0 comments
Open

Config routes and path helpers #317

International opened this issue Dec 14, 2017 · 0 comments

Comments

@International
Copy link

How are you guys storing your config options? For example, consider this snippet:

config :coherence,
  logged_in_url: "/projects"

I'd like not to have to hardcode the path in there ( config/config.exs ), but if I have it like this:

logged_in_url: Helpers.project_path(XtimersWeb.Endpoint, :index)

I get an error saying:

module XtimersWeb.Router.Helpers is not available

My guess is that it's because phoenix generates this? Another option would probably be an environment variable, but that too might get out of syncs with the routes. Is there a better way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant