@StatelessCode
  @StatelessCode
Stateless Code | Configure Devise Settings and Add Environment-Specific Rails Credentials @StatelessCode | Uploaded October 2022 | Updated October 2024, 8 hours ago.
After installing Devise in the previous video, we add the required configuration and customize the configuration to match the preferences for the app.

We delve briefly into working with Rails views and layouts using embedded Ruby in HTML (html.erb) and using Tailwind Play to validate the styling classes we are using.

After that, we configure a Devise secret key and pepper using Rails encrypted credentials on a per-environment basis. We walk through creating those files and how to access the attributes. (Then we change the attributes we displayed on-screen before committing so that there isn't an encrypted and decrypted version of the file available on the internet.)

We go through the rest of the configuration options, making changes based on preferences for this application.

After fixing some RuboCop offenses, we create a GitHub Actions version of our test credentials file and use GitHub repository secrets to get the file into our build.

This video covers:
00:00:12 Introduction
00:01:39 Configure default_url_options in environment files
00:03:32 Add flash messages to application layout and use Tailwind Play to double-check them
00:08:30 Set up Devise secret_key and pepper using Rails credentials for various environments
00:20:20 Customize the other attributes in the Devise configuration file to match preferences for the app
00:29:18 Run RuboCop, correct offenses, add exclusions
00:33:08 Create a specific credentials file for GitHub actions
00:38:27 Modify main.yml build to copy GitHub Actions version of credentials
00:40:26 Use repository secret to copy GitHub Actions key for credentials into the build
00:42:00 Commit and first build attempt
00:45:22 Build failed, remove master key environment variable from main.yml build
00:47:17 Mark sub-task complete

#ruby #rails7 #rails #rubyonrails #rubygems #codecast #screencast #github #opensource #minitest #TDD #agile #NerdDice #DnD #roleplaying #softwaredevelopment #learntocode #tailwind #postgresql #rubocop #bundler #gemfile #devise #turbo #githubactions #railscredentials

See other related StatelessCode videos:
- Install Devise 4.8 on a Rails 7 Application youtu.be/CbWwqLK8T1Q
- Set up GitHub Actions with Rails 7 and Get Working with PostgreSQL youtu.be/sIfGSdQvODU

This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.
Configure Devise Settings and Add Environment-Specific Rails CredentialsCodecast: Install Rails 6, PostgreSQL 13, MariaDB 10.5Install balenaEtcher on Ubuntu 22.04Inkscape 07: Create a logo for the statelesscode.com WordPress SeriesUpgrade to Devise 4.9 on Rails 7 and Decommission the 4.8 HacksCodecast: Create a RubyGem 56: Refactor roll_ability_scores SpecsCodecast: Getting Started with Rails 7 24: Use ActionText for Rich Text ContentCreate Pre and Post Sign-In Pages to Test DeviseInstall VirtualBox 7 on Ubuntu, Windows, and Intel MacCodecast: Getting Started with Rails 7 27: Add a Stimulus Controller for Client-Side InteractionCodecast: Create a RubyGem 79: Refactor ConvenienceMethods - Part 1Codecast: Create a RubyGem 87: Downtime Hodgepodge and a Contributor

Configure Devise Settings and Add Environment-Specific Rails Credentials @StatelessCode

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER