Ruby on Rails | rubyclub
1.53K subscribers
218 photos
1 video
266 links
Software Writer @yegorckv
Download Telegram
Building an ActiveStorage and S3-Powered Direct Drag-Drop Uploader

A fantastic series of posts walking through the building of an elegant file uploader control for a Rails app, from setting up the model and controller to using Stimulus, hooking up ‘direct to S3’ uploads, and a way to monitor upload progress.

https://code.avi.nyc/an-activestorage-s3-direct-uploader-part-1-the-drag-and-drop-interface
Advanced Database Programming with Rails and Postgres

Learn about subqueries, materialized views, and custom data types in Postgres and Rails. We walk through realistic real-life examples, translating first into SQL, and then into Rails code. Every example comes with source code to follow along.

https://pganalyze.com/ebooks/advanced-database-programming-rails-postgres
👍8
A simple Stimulus Tabs Controller

If you're after a simple Stimulus controller to handle tabs in your Ruby on Rails app, look no further. This controller handles toggling between multiple tabs, choosing a default tab, and adding CSS classes to the corresponding button.

https://railsnotes.xyz/blog/simple-stimulus-tabs-controller
👍6
OpenAI transcription API and ActiveStorage analyzers

In the second post of the OpenAI blogpost series, I’m going to build another feature powered by the OpenAI transcription API. The feature is simple: We’re building an audiofile upload with ActiveStorage. After the file has been uploaded successfully, we’re going to use the transcription OpenAI endpoint to get the audiofile’s text content.

ModernRails - https://www.modern-rails.com/posts/activestorage-analyzers-and-the-openai-transcription-api/
👍3
An Introduction to the ViewComponent Gem

Modern web UIs are complex. Traditional layout/template/partial techniques are not always the best fit. ViewComponent seeks to provide a better way. It's a framework for creating reusable, testable & encapsulated view components that integrate seamlessly with Rails. In this article, Abiodun Olowode shows us how to use ViewComponent to make our Rails views more manageable.

https://www.honeybadger.io/blog/ruby-view-components/
3
Sqlite & Rails in Production

When deploying a Rails application to production, its rare to question the idea of running a Postgres or MySQL database to persist data and Redis for caching, background job processing, and WebSockets, but what if it could all be done without running these services?

https://fly.io/ruby-dispatch/sqlite-and-rails-in-production/
Rails 7.1 Beta 1: Dockerfiles, BYO Authentication, More Async Queries, and more!

- Dockerfiles for new applications
- Build your own authentication improvements
- More async queries for Active Record
- Built-in support for the Trilogy MySQL adapter
- Support for composite primary keys in Active Record
- Enqueue massive amounts of jobs with perform_all_later
- Introducing config.autoload_lib and config.autoload_lib_once for Enhanced Autoloading
- Support to Bun

https://rubyonrails.org/2023/9/13/Rails-7-1-0-beta-1-has-been-released
Strada - Bridging the Web and Native Worlds

Strada is the missing library to take your Turbo Native apps to the next level. Turbo Native enables web developers to ship native apps, but the experience is limited to a WebView container within a native shell. The native app doesn’t have any knowledge about the web content that is being rendered, but Strada bridges that gap.

As part of the Hotwire family, Strada leverages the HTML you already have to enable high-fidelity native interactions on iOS and Android that are driven by your web app.

5th October 2023

Rails World 2023
DHH has introduced Kamal 1.0.

Now you can deploy web applications on various platforms, ranging from physical servers (so-called "bare metal") to virtual machines in the cloud.

Kamal provides continuous deployment without downtime, smooth restarts, resource bridging, remote building, management of additional services, and everything you need to deploy and manage your web application in production using Docker.

Originally designed for Rails applications, Kamal will work with any type of web application that can be containerized. Learn more in DHH's overview.

https://kamal-deploy.org/
DHH has released Strada

Strada is finally here! The last piece of the Hotwire trifecta has been released. Kudos to Jason and his team for the significant effort. I'm thrilled that every part of our story in interface and mobile development is now open source.

Check it out at https://strada.hotwired.dev/

"This has been Hotwire's mission from the start. Empower individual developers to independently create and deliver full-featured experiences across all platforms."

Read more about Finishing Hotwire with the introduction of Strada: https://world.hey.com/dhh/finishing-hotwire-with-the-introduction-of-strada-9efdf091
Strada officially launched!

Strada provides structure and organization to the tangled mess that is the JavaScript bridge. It simplifies and standardizes communication between web and native components, which makes building robust native elements a joy.

Strada example:

🎯 https://masilotti.com/strada-launch/

Announcing Strada:

https://dev.37signals.com/announcing-strada/
Rails GraphQL authentication from scratch

Devise is an awesome gem to add authentication for your rails application, but it may me a bit overkill solution if you are going to develop REST or GraphQL API for your SPA or mobile application. Today I’ll show you how to create GraphQL API without devise. I’ll use some methods that become available in rails 7.1.0.beta1, so please install this or higher version.

https://alec-c4.com/posts/2023-09-22-graphql-from-scratch
https://alec-c4.com/posts/2023-09-25-graphql-from-scratch-2
DHH about YJIT

YJIT is juicy! We're seeing +24% faster on the median, +12% on the average, and +10% on the P90 with Ruby 3.3 using YJIT in production on basecamp. Major kudos to the fine folks at ShopifyEng for making this happen 👏
🇩🇪 Germany Continues to Invest in Ruby

The German government's Sovereign Tech Fund is a publicly funded effort to support ‘open digital infrastructure.’ With a new round of funding for Ruby Central, the fund is showing a huge level of support for Ruby by helping to fund all sorts of things, including a 24/7 rotation of folks to handle critical security issues. Danke!

RUBY CENTRAL
Datacaster

This gem provides DSL for describing in a composable manner and performing run-time type checks and transformations of composite data structures (i.e. hashes/arrays of literals). Inspired by several concepts of functional programming such as monads.

Detailed error-reporting (with full i18n support) is one of a distinct features. Let your API consumer know precisely which fields and in a what manner are wrong in a deeply nested structure!

It is currently used in production in several projects (mainly as request parameter validator).

💻 View on GitHub
Please open Telegram to view this post
VIEW IN TELEGRAM
Rails 7. StartKit + pgAdmin 4

StartKit helps to launch Ruby on Rails application in minutes on any Platform. In this video we will see how to use pgAdmin4 with the project.

📺 View on YouTube
Please open Telegram to view this post
VIEW IN TELEGRAM