The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Active Storage: permanent URLs w/o redirects, using Digital Ocean behind Cloudflare
A short post on how to use Active Storage with Digital Ocean fronted by Cloudflare (to save money on bandwidth), and how to load attachments directly from the CDN without requests going through the app first, and then being redirected to the CDN. [more inside]
'Redirect' using POST in Rails. Full story
Full story of the gem ‘repost’ creation - https://dev.to/vergilet/redirect-using-post-in-rails-54pb
Unlearn programming to learn Ruby
Why is the Ruby philosophy the exact opposite of other programming languages? SEE MORE
Rails_DB - new version released
If you need online access to DB in your application (could be useful for QA, bug investigation or cases when you don’t have access to DB by port) you can use this gem: https://github.com/igorkasyanchuk/rails_db . The new version has few fixes, improvements and dependencies upgrades.
ActiveRecord Migration: terminology
Why do we refer to database updates as migrations in ActiveRecord? SEE MORE
Testing Active Job with Rails
Writing tests for background jobs is a lot easier than you might think using Rails’ built-in helpers. You can use them to verify jobs were enqueued with the right arguments and you can also use them to run the jobs inline. Watch the screencast to learn how to test ActiveJob
Solving Puzzles with Amb
Ever since an article about fibers, I was curious about an amb operator. Recently, I’ve solved a few classical problems using amb. The result turned out to be short, simple and declarative. Check it out
Unit testing rack middleware
Underneath (almost) all Ruby web application lies the Rack architecture. With minimal interface, it is simple to write a middleware. Let’s see how to test it: https://tejasbubane.github.io/posts/2019-11-12-unit-testing-rack-middleware/
ActiveStorage Resumable
A blog post describing the suffering of a full-stack developer and also preseting ActiveStorage Resumable, an ActiveStorage extension that supports resumable uploads for Google Cloud Storage.
strings-case release v0.1.0
The strings-case gem aims to help you transform any string into most popular cases, be it camelCase, snake_case, kebab-case, Title-case and more. It allows you to preserve acronyms and use a custom separator in case you need to change the default one.
Is it time to replace Rake?
We Ruby developers use Rake and Rakefiles for many of our build, test, and deployment scripts. Yet Rake has always felt a bit clumsy, and that shouldn’t be a surprise. It was actually not designed for most of what we use it for. Would a different tool work better? [more inside]
date-formats library / gem - read / parse dates (and times) from around the world
Hello, I’ve put together a date-formats library / gem that lets you read / parse date (and times) from around the world. Let’s try a French date e.g. DateFormats.parse( 'Lundi 1 Janvier', lang: 'fr') or a Spanish date e.g. DateFormats.parse( '1 Ene', lang: 'es' ) and so on. Happy date wrangling with ruby. Cheers. Prost. PS: Yes, you can add new (and more) formats using regular expressions / text patterns.
ClickHouse Ruby driver
https://github.com/shlima/click_house A modern Ruby database driver for ClickHouse, was inspired by currently unmaintainable alternative but rewritten and well tested. [more inside]
Clerq: requirements management, format, repository, CLI
Most of my work time I work with software requirements, and other items based on requirements, like estimations sheets. I write bulk documents and don’t like the behavior of big word processors (MS Word, LibraWriter, etc.) on bulk documents. I created a gem clerq that provides the ability to write big documents in small separate files using Markdown. More information you can get from README
Invisible Captcha new release: a honeypot protection plugin for Rails
Hello 👋 I just released a new version of Invisible Captcha (v0.13.0), a gem to protect your forms/actions from spam bots and spiders. [more inside]