rubyconfig / config

Easiest way to add multi-environment yaml settings to Rails, Sinatra, Padrino and other Ruby projects.
Other
2.11k stars 231 forks source link

Extend Rails integration to application #330

Closed retsef closed 1 year ago

retsef commented 1 year ago

Thanks for your gem, it helps us a lot!

In our projects we use this gem to decompose some attributes, non necessary to be protected, outside of Rails credentials. This helps our flow of PR reviews to be simpler and helps reads.

One of our usage has shown that it can be a duality with Rails.application.credentials values access with some sort of Rails.application.settings value access.

To be fair is not so different from use the class defined by Config.const_name directly but I think it can be also useful to have at the Rails application level

rdubya commented 1 year ago

I'm not against adding something like this, but I think it needs to be more configurable if we are going to do it by default. settings is a pretty common term that may cause conflicts in some environments. Using the constant is shorter and doesn't make it look like it is a part of the Rails implementation, so I think I'm more on the side of it just being something people do themselves. Any thoughts @pkuczynski ?

retsef commented 1 year ago

Thanks @rdubya for your response, and I also come up to not make this mandatory behavior in naming and pattern. Rails has already config_for to have multiple settings file inside config folder.

I will close this

pkuczynski commented 1 year ago

I agree @rdubya...