Skip to content

Does not respect defaults set in config.exs #6

@codehugger

Description

@codehugger

It seems that the Nanoid generate functions are not picking up the values set in config.exs.

I currently have this is my config/config.exs inside a phoenix project

config :nanoid,
  size: 21,
  alphabet: "0123456789abcdef"

When I open the shell iex -S mix I get the following

iex(1)> Application.get_env(:nanoid, :size)
21
iex(2)> Application.get_env(:nanoid, :alphabet)
"0123456789abcdef"
iex(3)> Nanoid.Secure.generate()
"yXR2LbmKTzohOefJ5ocCh"
iex(4)> Nanoid.NonSecure.generate()
"obxlccY4icVuAQO2l5vy_"

This shows that the correct configuration is loaded into the iex but it is not being picked up correctly by the module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions