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
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Some numbers about rendering times with different techniques. I see often that people are not aware of the importance of rendering views, and especially partials, in the proper way in Rails. In this blog post I show the different approaches with relative numbers. [more inside]
Learn about how you can discover changes in Rails defaults by using association reflections and make migrations easier.
I’m revisiting my series on future-proofing Rails test suites by removing controller specs. This time, I turn my attention to the controllers themselves, and look at ways to make your app’s logic more testable through refactoring. Enjoy!
The intent of Chain of Responsibility pattern is to decouple the sender of a request from its receiver by giving more than one object a chance to handle the request. http://rubyblog.pro/2017/11/chain-of-responsibility-ruby
AdequateErrors gem aims to overcome limitations of ActiveModel#errors object by offering more fine-grained controls.
Instrumentation is the addition of measurement to code - for example timing how long Ruby is spending in a given method. Here I propose an unintrusive Ruby 2.0+ technique to add instrumentation to arbitrary methods.
BitSettings is a plugin for ActiveRecord that transform a column of your model in a set of boolean settings. https://github.com/pioz/bit_settings
Microservices for Startups is a 12-chapter guide for engineering leaders and teams. It’s chalked full of practical advice and real examples for teams considering microservices. It’s designed as a reference book you can use as you navigate adopting Microservices in your company. [more inside]
Recently there has been a bigger release of Karafka, a Ruby + Kafka framework for Apache Kafka based Ruby and Rails applications development. This article covers major changes introduced with this release and provides some example use-cases on their usage. https://medium.com/@maciejmensfeld/karafka-ruby-kafka-framework-1-1-0-release-notes-b4c91170ecba
Sharing some rarely used Ruby on Rails tips in this article: https://email@example.com/5-ruby-on-rails-tips-you-probably-dont-know-8b80b4a0890f
Improve your productivity as a Ruby developer by using the best Atom packages, shortcuts & tips! http://www.rubyguides.com/2017/11/atom-tricks-for-ruby-developers/
Thoughts on an old question - are comments a code smell, yes or no? - many people seem to be either firmly on the yes or the no side when it comes to this. However, I think the question is much more nuanced than it is often made out to be. The post digs deeper.
https://anotherengineeringblog.com/twitter-mention-feature-for-rails In this blog post I detail how you can implement Twitter’s mention feature so users of your Rails app can mention other users just by typing @username. I also include a link to a sample application on Github which shows how the feature works you can play around with. Happy deving!
In order to improve performance of an application without using tonnes of resources the Worker Pool is a simple and efficient solution that powers many concurrency patterns. Here we are going to build one from scratch and explore some scheduling algorithms. https://hspazio.github.io/2017/worker-pool/
Just wanted to reach out and share some updates around my open source application performance application AppPerf. Here is a list of some of the updates I have made recently. [more inside]