Rails Posts

Rails 7.0 Branca and Caching

Organizing Code Gems and Engines have long been used to organize Ruby and Rails code into workable small units. Shopify has introduced a new system called ‘packages’ - they use the packwerk gem to help us.

Rails 7.0 Using Packages (Packwerk gem)

Organizing Code Gems and Engines have long been used to organize Ruby and Rails code into workable small units. Shopify has introduced a new system called ‘packages’ - they use the packwerk gem to help us.

Rails 7.0 - Decoupling with Events (or Commands / Service Objects)

It's possible to loosen the Coupling between Rails, Models and Controllers from your Business Logic (Commands/Service Objects) by enabling an Event architecture. Ruby has several lightweight Event Buses (& full featured and Event Stores)

Rails 5.2 - Command Objects and PORO Attributes

In a complex application validations, models, controllers can quickly get complex - command objects can simplify this - especially as of Rails 5.2

Rails 7.0 Base Setup

update GEMS library gem update –system be sure bundler is installed gem install bundler update Bundler library bundle update –bundler update Ruby rbenv install 3.1.1 rbenv global 3.1.1 or asdf install ruby 3.

Bridgetown 1.0 - Ruby Static-Site Orientation

A fun and straightforward way to build static sites using your Ruby & Rails knowledge

Passwordless Authentication with Devise

Devise offers a lot of useful User management, but has no Passwordless Strategy - here's how to do it

Rails 6.x Auth with MagicLink using SecureRandom Token

Passwordless Authentication is very convenient for users and generally as secure as passwords (according to many articles as long as the email access-links are short-lived - as email is not very secure).

Rails 6.x+ Auth with MagicLinks using Rails Signed GlobalIDs

Several simple approaches to password-less rails authentication

Rails 7.0alpha2 Test-drive

I thought it would be fun to test the new alpha version of rails - but I always forget how to do this without upgrading an existing projects. Discover the Rails Pre-release versions gem list rails --remote --prerelease -e –remote - checks the rubygems site - not the locally installed versions –prerelease - find pre-release versions -e - use an exact match (many packages have rails in the name).