Closed fbuys closed 1 year ago
@fbuys I think you'd need to add my_setting
as a keyword argument to your initializer for this to work: https://github.com/fbuys/bridgetown-sample-plugin/blob/47f37124f50c81b964c52ba8a981e0f398cda411/lib/sample_plugin.rb
There's probably somewhere in the documentation we should illustrate this more clearly. Also it's best to keep my_setting
as an optional kwarg (aka default to nil or some value) unless you absolutely need it.
Hey I pushed a PR that might be helpful.
Bridgetown Version: bridgetown 1.2.0 "Bonny Slope"
To Reproduce
Add config to initializers.rb
Start app or Run tests
Here is repo (branch:
initializers-issue
): https://github.com/fbuys/bridgetown-sample-plugin/tree/initializers-issueClone repo and checkout
initializers-issue
branchbundle install
and then runrake test
Current behavior
Inside the plugin initializer I am outputting like this:
Expected behavior
I would like to access the config options set in the app initializer.
should output:
Computing environment (please complete the following information):