Know-How
This is our digital garden, which includes tips, tricks, recipes, stories and opinions about technical topics.
Docker
Hardware
MySQL
PostgreSQL
Authentication/Authorization
Ruby on Rails
ActionCable
ActionController
ActionMailer
ActionView
- Cancel link
- Default template engine for generators
- Passing variables to views
- Inline assets with propshaft
- Render a Markdown string
- Render outside request
- Check if view exists
ActionView forms
ActionView view components
ActiveModel
ActiveRecord
- Change default value in migration
- Clear query cache
- Create join table
- Check database configuration
- Foreign key to differently named table
- Find models without associated models
- Different database systems
- Unique index on multiple columns
- Zero downtime migrations
ActiveRecord Postgres
- Create array in postgres
- Concurrent index
- Check for value in array
- Index name too long
- Is string null or empty?
- Select attribute within JSONB
- Get Postgres version from Rails console
ActiveRecord SQL
ActiveStorage
ActiveSupport
Authentication
Devise
Authorization
Cancancan
Data
Datetime
Debugging
Gems
Internationalization
Rake
Routing
Turbo
RSpec
- Attach file with capybara
- Check that email was sent
- Inspect test data in database
- Use `dom_id` in a spec
- Define route within spec
- Expect a job to be enqueued
- File fixtures
- Find link by text in e-mail
- not_change matcher
- Run without a type
- Stub Rails.env
- Find WebMock requests
- Expect within epsilon
Capybara
Mocks
Ruby
- Source location of class or module
- eql and equality operators
- Local Gemfile
- Source location of method
- Method definition on one line
- Root URL
- Catch signal from Ctrl-c
- Use standard confing for Rubocop
- Call super of super
- Pass options to to_csv
- Bundle gems into vendor