Boring Rails
Tiny Tips
Articles
Tiny Tips
Tips about Ruby on Rails, StimulusJS, Tailwind, Hotwire, and building products
Filter by
ruby
rails
product
testing
tailwind
stimulusjs
heroku
Sorting ActiveRecord results by enum values (in SQL)
Dynamic user content in Rails with Liquid tags
Accessing Rails environment variables from a StimulusJS Controller
Rails validations: database level check constraints
Debugging slow Heroku builds
Quickly explore your data with `uniq` and `tally`
Improving your Rails mailers with `email_address_with_name`
Building lightweight components with Rails Helpers and Stimulus
Combine `redirect_to` and the `anchor` option
Lazy-loading content with Turbo Frames and skeleton loader
Use `to_sql` to see what query ActiveRecord will generate
Prefer returning chainable ActiveRecord objects
Rails validations: unique within a certain scope
Boring breadcrumbs for Rails
Sharing common code between Rails controllers with `Scoped` pattern
Run different ActiveRecord validations based on context
Find records missing an association with `where.missing`
Testing multiple sessions in the same test with Capybara
Pluck single values out of ActiveRecord models or Enumerables
Never mix up greater/less than when comparing dates again
Super readable String operations with `delete_prefix` and `delete_suffix`
Setting CSS classes in Markdown with Jekyll / Bridgetown
Use Heroku Dataclips to share query and do ad-hoc data exports
Ensure required environment variables are set when booting up Rails
Search and debug gems with `bundle open`
Automatically cast params with the Rails Attributes API
Show relevant chunks of text with Rails `excerpt` helper
Use Rails `link_to_unless_current` for navigation links
Use Rails `cycle` to avoid `i % 2 == 0` in your view loops
Use the Rails helper `highlight` when showing search results