This is the repo for the Finance Tracker App built with Ruby on Rails 6
- Sign up
- hashed password
- Confirmation => Send email to verify
- forgot password => Send a confirmation link to email just like above
- Login
- remember user
- Logout
- Attributes name, ticker_symbol and price
- Automate looking up stock (currently only possible through rails console)
- Automate API key insertion (instead of having to key it in everytime we look up a stock)
- This will expose us to secure credentials in Rails apps: credentials.yml.enc (encrypted file) master.key (key to decrypt credentials file)
-
Generate a Stock model rails g model Stock ticker:string name:string last_price:decimal
-
Store secrete key:
Run this command to open credentials file, and add key into it
EDITOR="code --wait" rails credentials:edit
E.g. we store key like
iex_client:
publishable_token: "our token"
To reference in code, we use: Rails.application.credentials.iex_client[:publishable_token]