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.
Wrapping existing JavaScript library with Opal
Ruby-fy your JS code using Opal http://ilyabylich.svbtle.com/wrapping-javascript-library-with-opal
Application Border Control with form objects
Latest post in my series on using Domain Driven design with ruby. http://insights.workshop14.io/2015/07/23/application-border-control-with-ruby-form-objects.html
Localizing Emails in Rails
There’s plenty of information on how to localize your application content in Rails, but details on how to send localized emails is harder to find. Here’s how to do it.
Discovery Tests vs Unit Tests
I don’t do Unit Tests, instead I do Discovery Tests (thanks to Justin Searls for the distinction). Coupled with the use of the Command pattern in my Rails apps, this makes my tests and code much simpler: http://theartandscienceofruby.com/2015/07/16/what-is-a-discovery-test/ [more inside]
Model Caching with Redis in Rails
Rails app performance particularly in production is critical. This tutorials gives you a step-by-step way on caching your model using redis hence speeding your app. Read it here
I've just published "KAInstagram, Episode #2 | Dashboard"
https://goo.gl/YOhRYf Ruby, Sinatra, Dashing, HighchartsJS etc. Btw I’m available for #hire :-)
voyeu-rb. WatchPeopleCode.com API Wrapper
I created a Wrapper for the WatchPeopleCode.com API. Feel free to check it out. voyeu-rb
Using Rails 5 Action Cable with ReactJS
Action Cable provides real time communication. ReactJS is a good tool to manage view complexity on the client side. Together they make it easy to develop snappy web applications which requires state management on the client side without too much work. I walk over using Rails 5 Action Cable with ReactJS in this post.
Finder Objects
To encapsulate query logic from the controllers, we always reach for ActiveRecord scopes. Let’s instead introduce Finder objects, and see what are some of the advantages of using them over scopes.
Benchmarking Ruby's `method_missing` vs `define_method`
Optimizing slow codebases starts by focusing on low-hanging fruits, but facts are more than recommended to justify any sort of change. So I went ahead and benchmarked/graphed the performances of method_missing and define_method.
Spree search autosuggest extension
I’ve just updated the spree_autosuggest gem to work with latest versions of spree and rails.
Understanding Ruby’s strange “Errno” exceptions
If you’ve ever taken a look at Ruby’s exception hierarchy, you may have noticed something weird. In addition to all of the normal exceptions like RuntimeError and NoMethodError, there’s an odd reference to Errno::* . This post discusses what these exceptions are and how to interpret them. http://blog.honeybadger.io/understanding-rubys-strange-errno-exceptions/
Turn Ruby conference talks into your own personal podcast
Ruby conference videos are great. But videos take time. So, after conference videos are posted, I’d love to take some of the non-code-heavy talks and put them where I’ll naturally run into them: inside my podcast player. And it turns out there’s a pretty easy way to do just that.
How to Use Custom RSpec Matchers to Specify Behaviour
Arjan van der Gaag shows a detailed example on writing a custom RSpec matcher to improve your test code. It helps you understand this useful technique and includes useful refactoring steps. Read the article.
Continuous Delivery demo project KAInstagramV2.3 on @LinkedIn
Btw I’m Ruby craftsman and looking for a job, so don’t hesitate to hire me ;) https://goo.gl/WTB14g
How to query Rails time zones and create cron task based on Day / Time
I wrote about querying Rails time zones to achieve rake tasks like on Monday 7am send the list of task due this week to my users based on their timezone. [MORE DETAILS HERE]
Build a Minimal Docker Container for Ruby Apps
Ile Eftimov describes how to build a Docker image with a working Ruby environment and how to deploy a Ruby application to a container. [more inside]
Making the best of private methods
Wondering what good private methods are? I wrote about making the best of them here.
Disc: Simple Disque-powered Ruby jobs
Disc fills the gap between your Ruby service objects and antirez’s wonderful Disque backend. [more inside]
A theoretical introduction to unix daemons in Ruby
Unix daemons are programs that run in the background. Nginx, Postgres and OpenSSH are a few examples. They use a some special tricks to “detatch” their processes, and let them run independently of any terminal. I thought it’d be fun to do a post illustrating how they work in Ruby. http://blog.honeybadger.io/unix-daemons-in-ruby/
All the Columns Fit to Index: Unique + Compound Indexing
Database indexing is often unchartered territory for many developers. Adding an index can be a powerful and efficient tool in application performance. But there are many different types of indexes out there…how do you know what your options are – and which ones to choose? This blog post dives into indexes and explores two cool techniques for using them: unique and compound indexing.
Introducing the Passenger Library project
The Passenger Library project is the next-generation documentation for the Phusion Passenger application server.
6 Concepts for New Volt Users
In Episode 10 I go over the most essential concepts when you learn Volt: Opal, Promises, Models, Collections, Stores and Controller.
Testing Ruby's floats precision
Float precision in Ruby is a well known quirk. But when testing floats, not many of us bother to remember this and make their tests respectful to this quirk. In this post we will see how the popular Ruby testing frameworks help us test Floats properly.
My favorite Ruby (On Rails) refactoring talks
I’ve curated 5 of my favorite talks on code refactoring, taking into consideration the information presented, the quality of examples and the quality of the presentation itself. The article includes links, short descriptions and useful additional resources: https://www.infinum.co/the-capsized-eight/articles/best-ruby-on-rails-refactoring-talks