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

Rails 7 credentials #109

Closed
skliask opened this issue Jun 17, 2022 · 1 comment
Closed

Rails 7 credentials #109

skliask opened this issue Jun 17, 2022 · 1 comment
Labels

Comments

@skliask
Copy link

skliask commented Jun 17, 2022

Issues with rails 7

Thanks for the good job!

While the point i will raise is not creating a current problem, it might create problems in the near future.
The issue is that it would be nice if the keys would be loaded through rails credentials instead of needing to work with .env files. It would be closer to "The Rails way"

@skliask skliask added the bug label Jun 17, 2022
@kraft001
Copy link
Collaborator

With the new version 4.3.1 of uploadcare-ruby it's possible to use keys from Rails credentials. For example:

### config/credentials.yml

uploadcare:
  public_key: my_public_key
  secret_key: my_secret_key
### config/initializers/uploadcare.rb

Uploadcare::Rails.configure do |config|
  config.public_key = Rails.application.credentials.dig(:uploadcare, :public_key)
  config.secret_key = Rails.application.credentials.dig(:uploadcare, :secret_key)
end

@rsedykh rsedykh closed this as completed Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants