Ruby on Rails | rubyclub
1.53K subscribers
214 photos
1 video
264 links
Software Writer @yegorckv
Download Telegram
📺 Turbo 8 and Turbo Native

Turbo 8 works out of the box with Turbo Native, on both iOS and Android

But there's a big gotcha. The latest releases of Turbo iOS and Turbo Android show a very noticeable flicker when changes are broadcasted.

Lucky for us there are already PRs to fix the issues on both platforms. So I put together an 8 minute video showing how to fix the issue in your Turbo Native apps.
Please open Telegram to view this post
VIEW IN TELEGRAM
👩‍💻 A decent VS Code + Ruby on Rails setup

“Setting up VS Code for Ruby on Rails development can be tricky, so I wrote this article to help. In it, I share different VS Code extensions for things like autocomplete, linting, formatting and more.” Harrison also shares his own Ruby on Rails extension pack that brings together all his suggestions in one install.
Please open Telegram to view this post
VIEW IN TELEGRAM
The #ActiveModel documentation has just been reviewed and edited and the PR is now up for community review. Fair warning: this is a lengthy guide, but if you have time and want to help, please take a look:

💻 [RF DOCS] Active Model Basics Documentation [ci-skip]
Please open Telegram to view this post
VIEW IN TELEGRAM
DHH about Rails 8 and Kamal 2

It should be dead simple to run multiple Rails applications on a single server with automated SSL configuration without having to learn nginx, Traefik, or any other swiss-army-knife proxy. We will make it so with Thruster, Kamal 2, and Rails 8 by default.
⚡️Let's build a Hanami app

Hanami is a fresh take on building full-stack Ruby apps. With its focus on abstractions, minimal defaults, and speed, it could be the framework to take on Rails' dominance of the Ruby landscape. In this tutorial, we build a simple app using Hanami and, along the way, learn the framework and how it works.
👩‍💻 Ruby jobs advertised on Linkedin

If you are looking for a Ruby developer job abroad or even remote work, it's interesting to look at which places have the most jobs posted on Linkedin for those skills.

These interactive charts will tell you the places where the most jobs are being offered and also compares the job offers with the local poulation to understand how competitive the job market could be.

There is a world chart but also a close-up on Europe and a detailed map of the USA where the information is broken up by state.
Please open Telegram to view this post
VIEW IN TELEGRAM
❤️ Active Record Basics Guide Refresh, Encrypted Attributes Re-Optimization, and more...

- The Rails World CFP will close in just one week on March 21.
- Active Record Basics Guide
- Do not try to alias on key update when raw SQL is supplied
- Memoize “key_provider” from “key” or deterministic “key_provider” if any
- 🇰🇿 Updating Astana with a Western Kazakhstan timezone
- Preserve encoding on “truncate_bytes”
- Support custom blob key in ActiveStorage::Blob.compose
- Fix MySQL adapter for inserts with aliases
- Railties configure sanitizer vendor in 7.1 defaults more robustly
Please open Telegram to view this post
VIEW IN TELEGRAM
📺 Build a Chat App with Ruby on Rails and Ollama

This video is a modification of an earlier popular tutorial that demonstrated how to create a chat interface using Ruby on Rails and ChatGPT.

Unlock the power of local language models with this game-changing tutorial! Join me as I take you on a journey to integrate the cutting-edge Ollama framework into an existing chat application.
Please open Telegram to view this post
VIEW IN TELEGRAM
📺 DHH - Ruby on Rails, 37signals, and the future of web development

This podcast really did the tour. Why Rails needs Ruby, and could never be done in any other language. Why the #nobuild future snuck up on everyone. Why it's time to look at Apple alternatives. Why the cloud marketing campaign was so successful.
Please open Telegram to view this post
VIEW IN TELEGRAM
Solid Queue has graduated from its incubation under basecamp/ to it's future home under rails/ in anticipation of becoming the default queue in Rails 8 🎊

https://github.com/rails/solid_queue
The Rails (Edge) Guides got a new facelift today! Read about it on the blog: https://rubyonrails.org/2024/3/20/rails-guides-get-a-facelift
📺 TRAILBLAZER TALES #00 | What is business logic?

Learn about the Trailblazer framework by refactoring a chunky Rails controller action to an operation. This episode discusses what we understand is business logic and shows how to setup a basic operation with its file structure and test.

All the videos about Trailblazer.
Please open Telegram to view this post
VIEW IN TELEGRAM
Use this commands for new Rails app:

"rails new myapp --main -d=postgresql -c=tailwind -a=propshaft"

"--main" ensures that I have all the goodies that are not available with Rails 7, and will only be released with Rails 8 (presumably around RailsWorld 2024 in September)

New features:

Built-in PWA (Progressive Web App) support
Default Github CI config
Propshaft - lightweight version of sprockets
Brakeman - security scanner
Rubocop code linter

You can learn more about all the "rails new" options by typing "rails new --help" in your terminal.
📺 SupeRails #163 Instant page loads with Turbo 8 prefetch (aka InstantClick)

Turbo 8 has been released! One of the core new features hover-click preload acceleration (aka InstantClick).

InstantClick makes an assumption about potential user behaviour: now whenever you hover on a link, it will fire a GET request to retrieve that page. So when you actually click on the link, it will load faster.
Please open Telegram to view this post
VIEW IN TELEGRAM
Save Time with Custom Rails Generators

Learn to create time-saving reliable custom generators quickly and efficiently.

It's time to quit the copy-paste-search-replace dance.
Duplicate an existing file. Then duplicate the corresponding test file. Open them in your editor. Search and replace throughout both files. Manually update or delete a few more things.

Run the tests. Track down spots the search and replace didn't catch. Fix those issues, and run the tests again. Then you can get back to the real work.
That's no way to do things, and yet, we've all done it far too often.

You already apply and re-use basic patterns on a regular basis. You're just doing it the hard way—either because you didn't know or because you believed custom generators required more effort than they're worth.
HotwireCombobox: A Turbo + Stimulus Autocompleting Combobox — Simple, sweet, and well explained on the homepage, complete with live demo. Designed for modern Rails 7 apps. GitHub demo.
💻 Retry known idempotent SELECT queries, New Active Record configuration option, and more.

Two new guides are now open for community review. If you are well versed in Action View, partials, and helpers, please review and submit your feedback here:

Action View Overview PR
Action View Helpers PR

Add config.active_record.permanent_connection_checkout setting This setting determines the action taken when ActiveRecord::Base.connection is accessed: whether it raises an error, emits a deprecation warning, or does nothing.
Please open Telegram to view this post
VIEW IN TELEGRAM
💻 Seven deadly Rails anti-patterns

Developing web applications with Ruby on Rails is known to be hellishly productive. What’s the price of this deal? Let’s talk about design patterns leveraged by the framework responsible for increased productivity and at the same time often acclaimed for being anti-patterns.
Please open Telegram to view this post
VIEW IN TELEGRAM