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.
Yard-Junk: getting rid of junk in your YARD docs
Yard-Junk is a new YARD plugin/patch, that provides structured documentation error logging and documentation errors validator, ready to be integrated into CI pipeline.
[Screencast] ActiveRecord Migrations
This episode covers different tips and tricks around database migration files. https://www.driftingruby.com/episodes/activerecord-migrations
5 Years of Professional Ruby and Rails Development - My Reflections
As hard as it is for me to believe, I already have over 5 years of professional experience in Ruby and Rails. Throughout all these years my attitude towards Rails has been fluctuating between going from blind love to harsh critic (ActiveRecord, I’m looking at you) ending with a bit more balanced but certainly a positive approach. Such time is long enough to have a meaningful opinion about the overall experience using any framework, so here are few points about Rails that I would particularly like to focus on in my reflections. [more inside]
Tutorial on how to integrate a Third Party API using Rails 5
Learn how to do a Third Party API integration in Rails 5 using Faraday.
How to work with Rails-based ecommerce platform, Shoppe
How to work with Rails-based ecommerce platform, Shoppe
Best practices for building a Rails admin interface from scratch
Active Admin is great for quickly rolling out a simple CRUD interface to manage your app’s data, but sometimes you need something more customized. If you are considering building an admin panel from scratch, be sure to follow these best practices or you might regret rolling your own down the road. http://www.carlosramireziii.com/best-practices-for-building-a-rails-admin-interface-from-scratch.html
beer.db.starter Sample - Build Your Own HTTP JSON API (w/ beerd.db)
Hello, I’ve updated the beer.db web service starter sample that gets you started building your own HTTP JSON API using the beer.db (and friends). What’s news? The starter sample now uses the new webservice library (a simplified sinatra 2.0-style library for HTTP JSON APIs). Enjoy. Cheers. Prost.
Improving Deletion Performance in Algolia's Ruby Library
How we found out that deleting objects from Algolia was slowing down our server and what we did to improve it. [more inside]
Translate your ActiveRecord attributes without stress or bloat
In this article you’ll see how easy it is to provide translated attributes in your ActiveRecord records without relying on external librairies thanks to native JSON fields.
Rails Custom Loggers
Custom loggers are useful if you wish to have a separate log file for different moving parts of your Rails application. This would make your logging more efficient and readable. (Eg: a file to record all the API request you received). Let’s have a look on them! [more inside]
Carrierwave Gem for file uploads in Rails
Carrierwave Gem for file uploads in Rails
Generate an application with a specific Rails version
Two simple ways we can generate rails app with specific version:
Timber Gem - My solution to Ruby's hard to use logs
Hi everyone! You might remember from me from my Authlogic days, I’m really excited to share Timber with you. A thorn in my side has always been Ruby logging. Logs are essential for insight, but oh how I hate hated using them. Timber is my solution. Highlights: logrageify option, integrates with rails/sinatra/hanami, support for context & structured data, tail users. I’d love feedback on it.
Autocorrect with Postgres Trigrams
Did you know Postgres can provide spelling suggestions? Here’s how to use pg_trgm to auto-correct search queries in a Rails app.
Introduction to Concurrency Models: Processes, Threads, GIL, EventMachine, Fibers
In the blog post, I describe the differences between Processes, Threads, what the GIL is, EventMachine and Fibers in Ruby. When to use which of the models, which open-source projects use them, what the pros and cons are.
A Quick Analysis of How Sinatra Works
What can we learn from reading Sinatra’s source code? What interesting tips & tricks can we discover?
Gem Check – writing better Ruby gems checklist
This is the checklist for authors and maintainers of Ruby gems to help them build better open-source software. [more inside]
Rails 5 & Vue.js: how to stop worrying and love the frontend
Vue.js doesn’t only meet the awesome React, but also exceeds it in speed and performance. And finally, there has been added a modern frontend support in Ruby on Rails 5.1. It’s so nice and convenient, that our mkdev mentor Ivan Shamatov got over his fear of the fullstack development and even took a fancy to it. In this article he’ll tell you about how to integrate Vue.js into a Rails app. [more inside]
How to make AJAX calls in Rails 5.1
Learn how to make AJAX calls in Rails 5.1 using rails-ujs, jQuery or axios. Rails 5.1 shipped without jQuery as a dependency, replacing it with its own library rails-ujs for Unobtrusive JavaScript features. There are a few changes in the way you do AJAX calls, including things like data formats and CSRF tokens. This short article will bring you up to speed.
The === (case equality) operator in Ruby explained in examples
Check out how standard classes implement the === operator and how you can use it in your class as well.
webservice gem - yet another HTTP JSON API (web service) builder (in 100 lines)
Hello, I’ve put together a webservice gem - yet another Sinatra-style HTTP JSON API builder (in about 100 lines of ruby). Why? Why not ;-) The main “innovation” is easy dynamic loading of services e.g. use Webservice.load_file() to get a ready-to-use web services (rack) app. Cheers. PS: Inspired by Almost Sinatra (Sinatra in 6 lines of ruby) and New York, New York, Nancy, Rum, Cuba, and other Sinatra-like micro libraries.
Eager Loading Polymorphic Associations with Ruby on Rails
A tutorial on eager loading polymorphic associations with Ruby on Rails avoiding “n-plus-one” queries.
Goby v0.1.0 is out
Remember there was a language called Rooby, which said it want to help developing microservices more efficiently? In the past few months it quickly evolved and it’s now called Goby! [more inside]
Trailblazer + GraphQL Starter kit
sinatra-grapqhl is an opinionated starter kit to use sinatra with trailblazer, react and grapqhl