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.
Resolving Web Application Resource Bottlenecks with Concurrency
We wrote a general introduction to the bottlenecks of web applications and how application servers can deal with them to improve request throughput and response times. Good read for both the new and the experienced, read it here!
Easily View Postgres Query Plans from Active Record with pg-eyeballs
pg-eyeballs is a ruby gem that gives you detailed information about how the SQL queries created by the active record code you write are executed by the database. It gives you an easy, ruby friendly way to see the output of the Postgres EXPLAIN command and integrates with the popular query analysis tool gocmdpev. [more inside]
Be a better ruby backend developer – watch Java conferences
A short list of links to valuable Java/.Net conference recordings. More here
Check My Code: Tips to Keep Ruby Code Smell-Free
Let’s walk through a few common Ruby code smells and how to best deodorize them. Code smells are symptoms of a deeper problem, and by eliminating them, we can leave our code elegant and odor free! [more inside]
Stabilizing Your Test Suite Settings
We had recurring issues in our test suite when developers changed global settings without setting them back. This post describes how we prevented that from happening. [more inside]
Dynamic breaking points in Ruby
Being inside a breaking point, you can create more breaking points! An interesting approach that can save you some time when debugging a codebase that is new for you. Read more
My Last Rubyconf Brazil
I was the organizer of Rubyconf Brazil until this year, when I finally completed a personal goal I have set to myself 10 years ago. [more inside]
[Screencast] Version Control with Git Flow
Using Git Flow, learn how to work with branches and organize your changes. Once you have completed features, learn how to merge them back into a develop branch and prepare for a release to your master branch. https://www.driftingruby.com/episodes/version-control-with-git-flow
The Safest Way to Constantize
A look at the constantize method in Rails, how it can be exploited, and how to use it safely within your code: http://gavinmiller.io/2016/the-safesty-way-to-constantize/
Decoding Rails Magic: How Does ActiveJob Work?
Executing background jobs is quite a common feature in many of the web applications. Switching between different background processing frameworks used to be quite painful as most of them had different API for enqueuing jobs, enqueuing mailers and scheduling jobs. One of the great addition in Rails 4.2 was a solution to this problem: ActiveJob, which provides extra layer on top of background jobs framework and unifies the API regardless of the queue adapter you use. But how exactly does it work? What are the requirements for adding new queue adapters? What kind of API does ActiveJob provide? Let’s dive deep into the codebase and answer these and some other questions. [more inside]
Adding static pages to your Rails app
A quick look at the high_voltage gem which makes adding static pages to your Rails application a breeze: https://christoph.luppri.ch/articles/2016/09/25/adding-static-pages-to-your-rails-app/
Using Jekyll within a Rails app, on Heroku
We wanted to use jekyll to build a simple marketing homepage for an upcoming product but keep it on the same domain as the app itself. I’m describing the steps needed to set up jekyll to work within a rails app and how to get it running on Heroku in a quick blog post.
How to add file uploads with Shrine screencast
Watch the File Uploading with Shrine screencast to see how to add file uploads to your Rails app.
Easy way to implement GA code in your Rails app
Our company works with Ruby on Rails technology and that is why I would like talk with you about settings for Rails 4 application with Turbolinks. As a rule, you can implement GA code fast and easy, following these 4 steps. But pay attention to the points… http://blog.active-bridge.com/easy-way-to-implement-ga-code-in-your-rails-app
How to generate a swagger docs for Rails API
Making API for a Rails application is simple for a Ruby on Rails developer. In any case, how different clients/customers will know whether the API is working fine or not without a customer side application. Is there any answer for this which I can report for API inside the Rails application, The answer is yes we have numerous instruments and methodologies however I would favor swagger UI. In this article I am going to disclose how to make Rails API documentation using swagger UI
Ruby Plus Podcast Episode 14
Listen to this week’s Ruby Plus Podcast Episode 14
A digest of new articles interesting to Rubyists
We’ve decided to make public our regular digests of articles worth reading by the whole team. In our #1 public digest there are 10 links to interesting articles from around the web, from Ruby 3 new concurrency model (links to Koichi’s original slides from RubyKaigi) through ActiveRecord lazy evaluation to learning CSS Flexbox in a few minutes.
How to include methods in the JSON representation of a model
Here’s a short blog post about using active_model_serializers, so you can all get rid of your as_json, to_json and serializable_hash monkey patches:
https://christoph.luppri.ch/articles/2016/09/22/how-to-include-methods-in-the-json-representation-of-a-model/
Better File Uploads with Shrine: Attachment
In the previous post I talked about the foundation of Shrine’s design. In this post I want to show you Shrine’s high-level interface for attaching uploaded files to model instances, and what advantages it has over other file upload libraries. Read the post here.
Ruby Facets: a short & sweet podcast about Ruby news
Short story: The first episode of Ruby Facets was just published. Long story: Why Ruby Facets exists and why Ruby5 doesn’t.
The art of defining products
A post about how to turn your idea into a project [more inside]
A couple of words about interactors in Rails
Do you prefer skinny models or skinny controllers? That’s a mean thing, indeed, to ask incorrect question on purpose. mkdev.me mentor Ivan Shamatov writes about how to use Interactors, using an order in e-commerce app as an example. https://mkdev.me/en/posts/a-couple-of-words-about-interactors-in-rails
Decompose your rails controllers for ultimate power
I’ve published new gem. It offers a new approach to manage growing complexity in rails applications. gem: https://github.com/antulik/pagelet_rails
Custom Database Cleaner for ActiveRecord connections
Custom database cleaner for cleaning multiple databases in Rails applications when using dynamic ActiveRecord connections.