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.
Efficient algorithm to check dates overlap
Have just completed edit some of my articles posted earlier. I promise, it will be interesting read:
Simple Immutable Ruby URI builder
Class Iri helps you build a URI and then modify its parts via a simple fluent interface, for example: Iri.new('http://google.com/').add(limit: 50) will produce http://google.com?limit=50. The gem is here:
search_flip v2.0.0 released - The chainable ElasticSearch Client
search_flip, the ElasticSearch client with elegantly chainable queries and minimal dependencies is just released as v2.0.0 now. This version includes a huge bunch of great new features: improved alias, routing, bulk, analyze and connection support to name just a few. [more inside]
Truemail 0.1.9 released 🎉 - configurable plain Ruby email validator
The Truemail gem helps you to validate emails by regex pattern, presence of domain mx-records, and real existence of email account. Also new Truemail allows performing an audit of the host in which runs.
A simple guide to create an web app with React and Rails API
Learn by doing, to integrate ReactJS as frontend and Rails API for the backend, all in one Rails app codebase. Here’s the Article
Using Bootstrap with Webpacker and Rails 6
In the past, we’d install Bootstrap using the Rubygem. Now with Rails 6 using Webpacker for Javascript, we can use the node module to import Bootstrap’s CSS and JS. Learn how to use Bootstrap with Webpacker
How to download images files in Ruby
The easiest way to download an image or file in Ruby is using open-uri. This post looks at how to do that, what the potential problems are and how to do it better. This is my view on how to download images in Ruby.
Contract Scripting for Everyone: Hyperledger FabCar Chaincode Sample in (Secure) Ruby
Hello, for the Vienna Hyperledger Meetup I’ve put together a talk titled “Contract Scripting for Everyone: (Hyperledger) FabCar Registration Sample - From Go Lang Chaincode to (Secure) Ruby Contract Scripts” that shows that - surprise, surprise - (secure) ruby works great for (contract) scripting. Code is code and Hyperledger Fabric is really just a key-value store, that is, a simple hash table. Yes, we are still waiting for the SQL (relational) revolution in the blockchain world. PS: Bonus slides - Do you need a blockchain? TL;DR Version - No.
Rails 6: B-Sides and Rarities
Rails 6 contributor and early adopter Vladimir Dementyev walks you through the B-sides and rarities of the upcoming release, focusing on smaller features that appeal to mature applications.
Implementing authentication with Auth0 and Rails 6
Rails 6 + Auth0 for authentication using Rails’ credentials, a custom reset_sesssion and a more graceful way of handling failures.
GraphQL. The Rails way
A short story how one small gem can make big difference in ruby powered GraphQL:
The RSpec Style Guide: Reloaded
Recently I wrote a short article on some recent efforts to revitalize the work on documenting and promoting best RSpec practices.
How you can dual boot your application to get ready for Rails 6
This article explains how you can dual boot your application in your local environment and your CI server to help you get ready for the next stable release of Rails. [more inside]
4 amazing features of Ruby on Rails 6.0
The release of the newest version of Ruby on Rails is just around the corner. With it, a ton of new features will be introduced to the public. We’re excited to see all the new stuff Ruby on Rails 6.0 has to offer! With regular releases of the beta versions, developers had access to the upcoming framework for quite a while and they reported that it looks solid. Will the new Ruby on Rails 6.0 bring back the enormous popularity RoR once had? [more inside]
Use pessimistic locking to make long running tasks in Rails free of race conditions
Rails has you covered in situations like this but you should still be a bit careful :) [more inside]
Remove Unused CSS Classes from Tailwind CSS, Boostrap, and more with PurgeCSS
CSS frameworks like Tailwind, Bootstrap, Foundation, etc all come with many CSS classes you probably aren’t using. This creates huge CSS files unless we use a tool like PurgeCSS with Webpack to look through our code and remove the unused classes. Learn How to Use PurgeCSS with Rails
Moderate Parameters: The Path From Protected Attributes to Strong Parameters
We all know Strong Parameters isn’t exactly cutting edge technology. But with many apps still using Protected Attributes, we built a tool to bridge the gap. We call it Moderate Parameters.
Deploying serverless web apps to Google Cloud Run
Google Cloud Run is a new serverless platform that runs Docker containers as web services. Here’s a tutorial on deploying a Sinatra web app — it feels as easy as Heroku.
Graphiti: Stylish Graph APIs
Graphiti makes RESTful Resources a first-class concept. This enables reading and writing a graph of data in a single request, a schema with backwards-compatible gaurantee, end-to-end integration test patterns, seamless microservices and much more. A stylish alternative to GraphQL. [more inside]
Active Storage meets GraphQL: Exposing attachment URLs
The second post in “Active Storage meets GraphQL” series describing how to deal with N+1 problem, variants generation and code reusability when exposing attachment URLs in GraphQL schema.