SupeRails Blog - Ruby on Rails Tips & Tutorials
Ruby on Rails tips and tricks
312 posts and counting.
-
Devise has_many :sessions - track, list, and revoke active sessions
-
OAuth in Hotwire Native iOS apps with ASWebAuthenticationSession
-
Feature Flags and A/B testing with gem flipper
-
Devise Masquerade (Login as) with Avo
-
Ruby AI. Vector (semantic) search with embeddings
-
Staying Competitive - My Talk at Balkan Ruby 2025
-
Separate Google and YouTube OAuth Strategies in Rails
-
SupeRails Hack Space @ Friendly.rb 2025
-
Big family is the new flex
-
Google One Tap Authentication with Rails 8 and Devise
-
Deploying Rails 8 on Render.com
-
Use Solid Trifecta with one Postgresql database
-
Readonly Models without database
-
AutoNumeric.js: The Best Currency Input Field for Rails
-
Style window.confirm() with Turbo
-
Conditinally include Avo Pro in your Gemfile
-
Random Pagination
-
Monaco Mareterra
-
2025 is the year of Markdown. Avo built Marksmith Markdown editor for Rails
-
Get Youtube video thumbnail image
-
Typesense search in a Rails app
-
Starting an ecommerce store: not so easy. My story
-
My VS Code / Cursor plugins in 2025
-
My recommended Jekyll plugins in 2025
-
Start a blog with Jekyll and Github Pages for free
-
My first Ruby gem. hotwire_native_rails
-
Hotwire Native Rails Helpers
-
Conditional templates and Viewport for mobile browsers and native apps
-
Introduction to Nokogiri. Extract core website data
-
Replace Disqus with Giscus comments
-
Rails UI Frameworks and Component libraries
-
Hotwire Native Bridge Nav (UIMenu) Component
-
Hotwire Native Bridge Component - Prompt to leave an AppStore review
-
Hotwire Native Bridge Menu (Action Sheet) Component
-
Custom chapters with Vimeo Player API
-
StimulusJS Cmd Enter to submit form
-
Render Markdown FILES in Rails app
-
Use Vimeo API with Ruby on Rails
-
Sentiment Analysis. Analyze Udemy course reviews
-
Authentication Zero vs Devise
-
Hotwire Native Bridge Form Component with Rails
-
Hotwire Native iOS Path Configuration via API
-
Hotwire Native Nav Button with icon
-
Hotwire Native CSS and TailwindCSS variants (conditionals)
-
Hotwire Native iOS - Tabs and design customisation
-
Search and Autocomplete UK Company Information
-
Add mentions to a text field with TributeJS
-
Prevent images from bouncing on load with gem active_storage-blurhash
-
StimulusJS social SHARE button
-
Rails 7.2 native rate limiting
-
Generate and display OpenGraph images
-
French real estate sales database
-
Navigating Turbo Native: where to start
-
Search and Autocomplete French Company Information
-
Map guide to Corsica
-
FR-DE EU Electronic eInvoicing standard (FacturX, ZUGFeRD)
-
Rails 8 Authentication generator: user registration
-
Rails 8 Authentication generator: user sign in
-
TailwindCSS on Rails: Dark Mode
-
TailwindCSS on Rails: Minimize Collapsible Sidebar
-
Sign in with Apple in a Rails app
-
i18n basics. Change current app language.
-
Automatic i18n. Gem i18n-tasks. Phrase. Weglot.
-
Sell access to a GitHub repo. Automatically add/remove collaborators
-
TailwindCSS on Rails: reusable button variants
-
CFP - Hotwire Datatables with Rails. Frontend tips and tricks
-
Track change history of attributes and display diff
-
Tailwind CSS Bottom Navigation
-
Rails 8 will be a PWA (Progressive Web App) by default!
-
Embedded Stripe Checkout
-
Cannes-Paris: Car vs Train vs Plane
-
Manage active sessions in Rails 2024
-
Turbo 8 Prefetch (InstantClick)
-
Guest User Record (guest mode)
-
Import ICS events to calendar
-
How to access localhost anywhere with ngrok
-
Build a calendar from zero (Month view)
-
Generate PDF and PNG with Ferrum (headless Chrome API)
-
Calendar pagination with Pagy
-
My 2023 summary and 2024 plans
-
Country select dropdown. Why does country_select gem even exist?
-
Does Turbo 8 morphing make sense?
-
HTML to PDF in Rails with gem DocRaptor (successor of wicked_pdf)
-
Testing Rails cache
-
Revised: Hotwire Turbo Modals with HTML Dialog
-
Custom Turbo Stream Actions
-
Search multiple models
-
Generate barcodes on the frontend with JsBarcode
-
StimulusJS Keyboard Hotkeys (Keyboard navigation)
-
Crazy, stupid page transition animation with StimulusJS and TailwindCSS
-
Progress animation with HTML meter element and javascript
-
Modals with HTML dialog element, TailwindCSS and StimulusJS
-
TailwindCSS on Rails 03: Responsive content layout. Grid, Flex, Center
-
TailwindCSS on Rails 02: Responsive dropdown menu
-
TailwindCSS on Rails 01: Responsive layout with sidebar
-
Heroku upload local database to production
-
Use Gem Rack-attack with Devise and Rails 7
-
DRY custom error pages
-
Image scraping with Rails. Save image from URL to ActiveStorage
-
Finding similar/related posts/products based on matching tags
-
Use Sidekiq in Development and Production
-
Use YouTube API with Ruby on Rails
-
DateRangePicker with StimulusJS, Importmaps, gem Ransack
-
API pagination with Pagy
-
API Tracking and Usage limiting
-
API documentation with OpenAPI and Swagger using gem Rswag
-
Rails CRUD API requests with Faraday
-
Rails CRUD API requests with cURL
-
Build a Public-facing Rails API with Bearer token authentication
-
Testing Devise authentication with Minitest and Faker
-
Test Omniauth authentication (github, azure)
-
Omniauth with Microsoft (Azure Active Directory)
-
EU Ruby conferences in 2023
-
Find a saved WIFI password on Windows 10 or Windows 11
-
Broadcaster pattern for Turbo Streams Broadcasts
-
14 Ruby on Rails and 7 Hotwire interview questions in 2023
-
ChatGPT exists. Should I stop writing?
-
TLDR: Rails 7 Active Record Encryption
-
Trello Clone: drag, drop and save changes with Ranked-Model, SortableJs and RequestJs
-
Best practices for writing and collaborating on Rails code
-
What's the difference between Rails 4, Rails 5, Rails 6 and Rails 7?
-
Style default error pages in a Rails app
-
Reverse Engineering Pipplet Database Architecture
-
Recent search history with Kredis
-
Send SMS with Twilio in Rails
-
Realtime Online User Tracking with Actioncable and Rails
-
Live Visit Count for website or page. ActionCable, Turbo Broadcasts, Kredis
-
How to use the Browser Geolocation API with Rails
-
gem MapkickJS for beautiful JavaScript maps with one line of Ruby
-
gem Geocoder - calculate coordinates, distances, search nearby
-
Parse JSON with Ruby on Rails
-
Parse YAML with Ruby on Rails
-
Omniauth without Devise
-
Complete guide to iCalendar events with Ruby
-
Notes on using ActionMailer
-
Browser tab title notifications
-
CSS: make text on image readable
-
Hotwire Search Infinite Pagination
-
Hotwire Turbo: Edit each attribute inline
-
Process ActiveJob background jobs with gem good_job and Postgres without Redis
-
Use Service Objects
-
Passwordless: log in with magic link
-
StimulusJS advanced copy to clipboard
-
Slim Select with StimulusJS
-
Highlight @ mentions, convert # hashtags to links
-
Deploy to DigitalOcean App Platform in Production
-
Slack API. Send text, markdown and files to Slack
-
Github Actions. CI/CD basics
-
Estimated reading time calculator with Ruby
-
RGB complimentary colors (opposite colors) in Ruby
-
Autogenerate and store images with Rmagick and Imagemagick with ActiveStorage
-
Convert integer to time (hh:mm:ss)
-
Link to previous page if internal request
-
My journey through hackathons and startup weekends
-
Double loading StimulusJS controllers
-
Use SwearJar to moderate and censor bad words. **** you!
-
auto-style your html.erb with gem erb-lint
-
StimulusJS Tabs
-
Export CSV from Rails
-
Import CSV to Rails
-
Load partials async with Turbo Frames
-
StimulusJS checkboxes. Select all. Deselect all
-
Mass update selected records
-
Gem Kredis #2 - recently visited pages
-
Gem Kredis #1 - access Redis via ActiveRecord
-
Accept cookies consent banner in Rails
-
SVG in Rails. Gem inline_svg
-
Stop writing strftime
-
Chained select fields for gem City-State. Dynamic forms
-
Chained select fields for custom data structures
-
First steps to learning Web Development
-
My thoughts about Web Development in 2022
-
Classless CSS frameworks
-
Semantic HTML in Ruby on Rails
-
Fontawesome + Importmaps + Rails 7
-
gem acts_as_votable 4: cached votes, vote scopes, Hotwire
-
Hotwire Turbo Frames: Hovercards
-
Integrate MarkedJS Markdown Parser into a Rails app
-
Live form validations and error rendering. Live markdown preview
-
StimulusJS Textarea autogrow
-
StimulusJS Dropdown
-
🛑🇷🇺 Block access to your software from Russia IPs
-
TIL: Pass a Hash to Flash
-
Tip: distance_of_time_in_percent
-
#21 Hotwire Turbo: The one right way to do Modals
-
Gem data-migrate - an essential gem!
-
Quick tip: Using Partials to Simplify Views
-
Stimulus JS: A Basic Dropdown controller
-
#20 Turbo Streams: autocomplete search
-
#19 FORM_WITH: conditionally respond with html OR turbo_stream
-
#18 BUTTON_TO: conditionally respond with html OR turbo_stream
-
TIP: if-else, case-when, hash?
-
TIP: Rendering partials and collections
-
#17 Turbo Streams: Broadcasts
-
Install Ruby on Rails 7
-
Emoji select with `gem unicode-emoji`
-
TIL: HTML tags I did not know about
-
TIL: date_select VS date_field
-
TIL: Loading animation for a Skeleton loader
-
#16 Turbo Streams: Edit Modal.
-
Tip: Automatically annotate rails views
-
#15 Turbo Streams CRUD
-
StimulusJS autopaste controller
-
Make Devise work with Hotwire Turbo and Rails 7
-
Pretty URLs with gem friendly_id
-
RE-REVISED: Polymorphism 101. Part 5 of 3. Even better Polymorphic Comments
-
TIP: URL helper: Redirect to previous page
-
Validate uniqueness on the database level
-
#13 Turbo Streams: 5 ways to render View Components
-
Paginate/Tab records by any attribute
-
Basic CSS for new Rails projects without a CSS Framework
-
#12 Turbo: Pagination with gem Pagy, ViewComponent without page refresh
-
#11 Turbo Frames - Load content only when a dropdown is opened
-
#10 Turbo Streams - Create and stream records. Flash messages. Reusable Streams
-
Gem Meta Tags for better SEO
-
#9 Turbo Frame Tabs
-
#8 Hotwire Turbo: Tabbed content with Turbo Streams
-
ONLY Omniauth login with Devise (without email registration)
-
Tiny Tip: Inline if-else statements
-
#7 Hotwire Turbo Frames: Search without page refresh. Stimulus. Ransack
-
5 ways to associate current_user with record on create
-
Generate Entity-Relationsip-Diagrams (ERD) from a Rails app
-
#6 Hotwire Turbo: Increment likes count without any page refreshes
-
#5 Turbo: Button to update status and refresh frame. Edit inboxes inline
-
Tiny Tip: URL and link helpers.
-
#4 Turbo Frame - Sort records without page refresh. Sorting without a gem.
-
Tiny Tip: Debug current request in views
-
Current attribute. Access current_user from model
-
#3 Turbo: Keep the audio playing after changing the page with data-turbo-permanent
-
#2 Turbo Stream inboxes to inboxes/index. Lazy load form. Replace form on submit.
-
#1 Turbo Stream messages to inbox. Render errors
-
Install and use ActiveAdmin in 13 steps
-
HTTP Basic authentication
-
Generate a BARCODE for a Product
-
Generate a QR code for a Product and store it in ActiveStorage. Service Objects
-
Select or Create Tags with Tom-Select without jQuery (VanillaJS)
-
Gem Traceroutes - find routes without controller actions, actions without routes
-
Gem Public Activity: Complete guide to total surveillance
-
Export from database table to Excel Workbook. Level 1
-
Quick tip: Helper to display different text based on time of day
-
gem Draper: abstract view logic from the model
-
Boolean Checkbox array - easier than you think!
-
Procfile: automatically run migrations on Heroku deploy
-
Install and use Rubocop - TLDR
-
Stimulus Read More - MY WAY!!!
-
Rails authorization with gem Pundit
-
Rails enums - different approaches
-
Ruby on Rails 6+: install jQuery with yarn and webpacker
-
gem acts_as_votable 3: vote search scopes
-
config_for settings.yml
-
REVISED: Polymorphism 101. Part 4 of 3. Polymorphic Comments
-
Quick tip: Permit params by current user roles
-
Edit Rolify roles for a User
-
Markdown Level 2. Style markdown css with gem Rouge
-
Migrating from Bootstrap 4 to Bootstrap 5
-
Add Markdown to your Rails app
-
Role scopes with gem Rolify
-
Install and use gem pg_search
-
Stimulus Rails - Count characters in input field (+ add css if > 140 characters)
-
Stimulus Rails - Count characters in input field
-
StimulusJS - Display or hide HMTL based on field input
-
Install Stimulus on Ruby on Rails 6
-
Display or hide div based on field input (RoR + JS)
-
Add social log in with Github (Omniauth)
-
Complete guide to generating PDFs with gem wicked_pdf
-
install and troubleshoot mysql
-
gem acts_as_votable 2: reddit-style up and down voting
-
gem acts_as_votable 1: Like and Dislike posts with Vanilla JS
-
Discount coupon: Ruby on Rails 6: Learn 25+ gems and build a Startup MVP 2020
-
Launching course: Ruby on Rails - Learn to Build a Multitenancy Subscriptions SaaS app MVP
-
Install Bootstrap 5 with Ruby on Rails 6+. Yarn, Webpack. Popovers, Tooltips. StimulusJS
-
Telegram Part 3. Authentication. Bot to send private messages
-
Telegram Part 2. Notification for CRUD actions
-
Search field without gems
-
counter_cache - count how many children a records has
-
Telegram Part 1. Button to send group messages
-
Button to update status attribute of a table
-
Polymorphism 101. Part 3 of 3. ActsAsTaggable without a gem. SelectizeJS
-
Polymorphism 101. Part 2 of 3. Polymorphic Payments inside-out.
-
Polymorphism 101. Part 1 of 3. Polymorphic Comments.
-
Custom scaffold templates
-
Sending emails in production with Amazon SES
-
Install and use gem invisible_captcha with devise
-
styling for true false values
-
One hash field to manage all user roles
-
HAML or ERB for Ruby on Rails development in 2021?
-
Ruby on Rails 6: Disappearing flash messages with toastr
-
Navbar with Devise and Bootstrap (4, 5)
-
Add custom error pages in a Rails app
-
How to use Credentials in Ruby on Rails 6? TLDR
-
How to use Credentials in Ruby on Rails 6? Full guide
-
SaaS: How to code the subscriptions business model?
-
How to Embed Youtube videos with ActionText? TLDR
-
How to load Heroku production database in development?
-
Write skinny scaffolds and generators
-
Ruby on Rails: How to setup Postgresql? TLDR
-
How to Install FontAwesome with Yarn and Webpacker in Rails 6?
-
Ruby on Rails: templates and generators in 2020
-
Rails 6: Install Bootstrap 4 with Yarn and Webpacker: TLDR
-
Rails 6: Install Bootstrap with Yarn and Webpacker: Full guide
-
Push to github without re-entering password (connect SSH key)
-
Highlight link to current page
-
Ruby on Rails: Dark Mode: TLDR
-
Quick tip: Footer on the bottom of the page: TLDR
-
Install Ruby on Rails 6 with Webpacker and Yarn on Ubuntu: TLDR
-
Install Ruby on Rails 5 on Ubuntu: TLDR
-
3 months on Skillshare. My results
-
Build a Trello clone with Ruby on Rails, RankedModel and jQuery Sortable
-
Tracking Online Users using Timestamps
-
Memo - Rails ActiveRecord data types
-
Just hit 100 sales and $900 on Udemy!!! [RoR course]
-
$1000 in AWS credits for startups (For free)