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.
Anti-Pattern: Iteratively Building a Collection
Ruby comes with many fantastic Enumerable methods, but the two most useful ones come through Smalltalk via LISP: #map and #inject. What follows are some lengthy method definitions followed by rewrites that are not only more concise but also more clear in their intentions.
Single Responsibility Principle in Rails using Form Objects
This is my second post about Single Responsibility Principle in Rails using Form Objects. The examples are built using the Syrup::FormObject gem.
Rails cookies are dangerous
Turns out, Rails cookies can be dangerous and they don’t play nice with others. [more inside]
tenancy v0.2.0 is released
tenancy v0.2.0, a simple multitenancy with activerecord through scoping, has just been released.
i18n-tasks 0.2.1 and Google Translate
i18n-tasks v0.2.1 has just been released. The gem provides tasks to manage missing and unused translations in Rails. A notable new feature is the task to prefill translations using Google Translate:
Tutorial: Saying "Hello world" with Ruby on Rails
Guide to your first Ruby on Rails application. Saying hello world with Ruby on Rails
Creating gems-wrappers for executable java jars
This article describes Ruby gem for wrapping Java jars into Ruby gem and a practical example of how to use it.
Handling API Rate Limits by Retrying Requests in Background Jobs
Has your app ever encountered a 429 (Too Many Requests) status code when making requests to a third-party API? Getting rate limited can be a nuisance and if not handled properly can result in a negative user experience. While one solution is to catch the exception and ignore it, a better solution is to retry the request.
Speed up your Ruby on Rails application using WebP images
I just wrote an article about Speed up your Ruby on Rails application using WebP images. Hope this will help increase the speed of your ROR application.
Reading Rails - Exception Handling
Ok, so you know how to use Rails. [more inside]
Giving up on Ruby & Ruby on Rails
Nice article for those thinking of giving up on Ruby & Ruby on Rails.
Don't Stub the System Under Test
The System Under Test helps us focus on what we’re really testing, what Depended-On Components (DOC) interact with it, and how to replace a Depended-On Component with a Test Double (such as a stub, spy, or fake). [more inside]
The Future of Software Development
As the industry and the associated technologies mature, will software development eventually become less of an uncertain endeavor, or will it continue to be complex forever? [more inside]
Travis Foundation Launches Open Source Grants with Paymill and RVM
Today we’re launching the Travis Foundation, an initiative to improve and foster Open Source! [more inside]
Comparing and sorting elements with Comparable
Our previous feature “Building a collection of Kittens” was a huge success for our application. So, the product owner decided to bring this collection of kittens to a brand new level of awesomeness. Our mission is to sort kittens based on their cuteness.
Heap Overflow in Floating Point Parsing (CVE-2013-4164). Fixed in 1.9.3-p484 and 2.0.0-p353.
There is an overflow in floating point number parsing in Ruby. This vulnerability has been assigned the CVE identifier CVE-2013-4164. [more inside]
Decorators for your model in your view!
I released this gem a while ago, but I wasn’t certain of the direction I wanted to take. Now that I have, I hope it helps you with your project. [more inside]
themes_on_rails: multi-theme support to your Rails 3/4 application
I just released themes_on_rails: add multi themes support to your Rails 3/4 application.
Valle gem: built-in limit validations for your ActiveRecord model
Valle automatically adds validators to your ActiveRecord model(s) based on column type and limit.
Serving Fonts for Firefox with Fastly
Implementing a CDN for assets can be a big win. It’s relatively easy outside of serving fonts. Firefox is notoriously difficult and my latest blog post details the steps necessary to properly serve fonts to Firefox using Fastly.
Pluto Planet Site Generator New Styles / Template Packs - Hacker (Hacker News), Digest (Alterslash)
Hello, The pluto planet site generator gem that lets you build web pages from published web feeds now includes more template packs. You can see the hacker (inspired by Hacker News) and the digest (inspired by Alterslash) template packs in action on Planet Ruby or Planet Vienna.rb. Find out more at the pluto project site. Cheers. Happy planet.
How To Create PDFs in Rails
Mike Ackerman posted about creating PDFs in Rails with Wicked PDF.
Ruby API wrapper using Virtus and Typhoeus
I just posted an article about building a client API wrapper using Typhoeus and Virtus.