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.
101: Advanced OOP Structure in Rails Practice
When thinking about more advanced OOP structure, one can sometimes ask – how to incorporate it into a Rails application? I will try to answer that question in this blog note, introducing some advanced OOP concept into a Rails application (without any architecture gems). [more inside]
How to Use The Ruby Super Keyword
What does the super keyword do in Ruby? How is super different from super()? Find out in this new article: https://www.rubyguides.com/2018/09/ruby-super-keyword/
Cutting corners is a short-sighted strategy #noshortcuts
In between my travels to Thailand and Japan I felt inspired by a Twitter conversation with Pieter Levels from Nomadlist.com where the main subject was how 100% bootstrapped (ie: no external investment) and fully-independent lifestyle business companies were not perceived as ambitious. [more inside]
Optimize Dokku Deployment Speed for Ruby on Rails apps with Dockerfile
Dokku lets you setup Rails hosting infrastructure on a simple VPS without much dev ops experience. Although it is easy to get started, a default config might result in very slow and unreliable deployments. In this blog post, I will describe how I’ve improved my Dokku based Ruby on Rails (NodeJS with Yarn and Webpack) application deployment speed by over 400% using a Docker image Dockerfile. [more inside]
Tech Book Face Off: Confident Ruby Vs. Metaprogramming Ruby 2
A review and comparison of two books on patterns for writing better Ruby programs. http://sam-koblenski.blogspot.com/2018/09/tech-book-face-off-confident-ruby-vs.html
Implementing a custom Redis and in-memory bloom filter
In our email marketing products, we changed our bloom filter implementation by using a custom Redis and an in-memory bloom filter written in Ruby. We will go through iterations at solving a real problem and writing a custom bloom filter from scratch. https://godaddy.github.io/2018/09/11/redis-ruby-bloom-filter/
What makes a good changelog?
In the second part of our series on changelogs, we’re looking at the details of what makes a good changelog. Spoiler Alert: It’s all about Consistency, Readability and Relevance.
Polyglot content in a rails app
https://revs.runtime-revolution.com/polyglot-content-in-a-rails-app-aed823854955 A look at how to internationalize your app using the Mobility gem and allow you to reach new markets and customers by allowing content to be translated. Feedback would be greatly appreciated!
Refactoring Controller in a Good SOLID Practice
https://berniechiu.github.io/blog/posts/4f0bed1f/ Refactoring controller action in a good SOLID practice
monitor server events in real-time
https://github.com/igorkasyanchuk/rails_live monitor server events in real-time. [more inside]
Small Ruby Refactorings #1
Improving readability by replacing complex logic with methods: https://medium.com/@extendsmymind/small-ruby-refactorings-1-bc33d819490c
The Best Features of Active Storage
Rails 5.2 finally delivers file upload functionality straight out-of-the-box with a brand new core library called Active Storage. I’ve been using it in client work and side projects since the beta release, and the experience has been fantastic! If you haven’t had a chance to try it yet or you’re debating whether to use it in your next project, check this out: http://www.carlosramireziii.com/the-best-features-of-active-storage.html
The redo Keyword in Ruby
In the following article, we’re going to explore the following topics:
Smuggle gem! Exports and imports with ease
It’s a gem to manage exports and imports with ease, separating the logic from the models, resulting in a cleaner codebase. [more inside]
Send monit alerts to slack
Monit2Slack is a small, but useful, gem that sends monit alerts to a slack channel via a webhook.
A command line interface gem for caniuse.com
The cani gem allows you to browse caniuse.com data directly in the terminal. It can show feature support for a specific browser version or display all features with per-browser support. It also ships with auto completions for zsh, bash and fish shells. Visit the github repo for more information. Happy caniuse terminal-browsing :)
refine & using keywords in Ruby
In this article, we’re going to explore the following topics:
Measure performance trends of Ruby code
benchmark-trend will help you estimate the computational complexity of Ruby code by running it on inputs increasing in size, measuring their execution times, and then fitting these observations into a model that best predicts how a given Ruby code will scale as a function of growing workload. Enjoy!
SmsKit
SmsKit offers a streamlined API for sending text messages through any supported provider. [more inside]
FCM push notification with rails and ionic
This post will walk you through how to send push notifications using google FCM, rails and ionic 3.x [more inside]
How I got my first pull request merged on Rails-core
A guide on what developers can do to level up their open-source contributions - while still working a full time day job https://schwad.github.io/ruby/rails/community/2018/09/06/how-i-got-my-first-pull-request-merged-on-rails-core.html
Queue Up and Thread Safely
How a bug changed my mind about thread safety on Ruby https://medium.com/connected-living/queue-up-and-thread-safely-db896a2eae94
Using Rails Session Cookies for API Authentication
Avoid the security perils of storing an API access token in localStorage by using session cookies to authenticate users of a Rails 5 API. https://pragmaticstudio.com/tutorials/rails-session-cookies-for-api-authentication