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.
Applying Transformation Priority Premise
How does the code evolve when we apply TPP? Read it here: Factorial Kata
Youtube filter for html-pipeline
Need to convert youtube url into a video iframe? I just create a gem called html-pipeline-youtube for adding youtube filter to html-pipeline. I think this might be what you need!
Phez - a reddit-like application built using Ruby on Rails
Phez is yet another reddit clone, this time written in Ruby on Rails. We’re looking for rails hackers who might be interested in contributing. Phez ships with a built-in API (built using doorkeeper + oauth2 gems). Phez on GitHub.
Notes from How to Debug Anything Presentation by James Golick
One of the best presentation: How to debug Anything
How to implement an usable cookie bar for your Rails application
If you sell something in your Rails application, being a product or a service, and you live in Europe, you have to comply with the cookie law. There are multiple JS solutions out there to ease this task, but I will teach you how to implement a cookie bar from scratch so you have full control and make it usable.
ToDo tutorial code
Just published the code of the tutorials for creating a simple ToDo application with Rails.
Factories that makes JSON
Sometimes, it gets quite annoying while you are testing your API, that accepts JSON. Often the solution in this is to keep JSON data in fixtures and then parse that and provide to endpoint. Maintaining then becomes quite a pain, especial if you have to support complex JSON data types and introduce changes with time. Here is solution: Read more
How to add useful context data to exceptions in Ruby
Sometimes the standard backtrace / error message combo isn’t enough. Sometimes you need extra data to locate the cause of an error. In this post we’ll discuss three easy ways to add more context to your exceptions. http://blog.honeybadger.io/how-to-add-context-data-to-exceptions-in-ruby/
Kontena: Docker Platform for Rubyists
Kontena is a Docker orchestration platform that is written using Ruby. Kontena features advanced cluster scheduling, network overlay, vpn, image registry etc. Check the documentation and source code from Github.
Wrapping existing JavaScript library with Opal
Ruby-fy your JS code using Opal
Application Border Control with form objects
Latest post in my series on using Domain Driven design with ruby.
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: Read more
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"
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 ;)
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]