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.
Ruby Quick Tip: Case Testing Against Arrays of Values
Did you know that a when clause in a Ruby case statement can easily test against each item in an array? Learn More
Short note: how install thinking sphinx with PostgreSQL support
I just published a short note which will really help you if you want to use Thinking Sphinx with PostgreSQL. This note is for Mac OS X, but Unix/Linux users may find some useful info too.
Fast User Switching with a Custom Devise Authentication Strategy
A small blog post on how my company handles switching between users. Fast User Switching with Devise
Removing complex conditionals in your views
Removing conditionals in views at the Reverb.com Dev Blog, so that designers can process view logic easier
Relative Timestamps in Rails
Facebook’s news feed popularized the relative timestamp format of “X hours ago”. Here are some ways to implement Relative Timestamps in Rails.
Single branch flow, mandatory code review, feature flags.
We’ve just launched Ups & Downs of Pull Request Flow Part II with our alternative to PR flow.
Highly Distributed Ruby Rspec Tests - Part One - Theory
I just wrote a post, which is an attempt to spec out how to increase the time it takes to run tests, by distributing them horizontally. Appreciate any feedback! Highly Distributed Ruby Rspec Tests - Part One - Theory
Let It Quack! #ducktyping
A humorous narrative reminding developers to keep remnants of static typing out of Ruby’s duck-typed universe.
Book: Healthy Webhook Consumption with Rails
I’m writing a book on the best strategies for writing elegant, maintainable webhook integrations for your Rails apps. You can read the first chapter here.
Why Provisioning Matters
Take care of your server just as much as you do with your code. New blog post: “Why Provisioning Matters” written by “Miguel Palhas” of “Group Buddies”.
Rails Testing Antipatterns: Fixtures and Factories
I just published the first post in a series about Rails testing antipatterns. It’s about fixtures and factories.
Memory Monitoring And Limiting With LXC
A tutorial about Memory Monitoring and Limiting with LXC (Linux Containers) and the importance of building a metrics infrastructure. [more inside]
Why we say NO to feature branches & pull requests
Why we say NO to feature branches & pull requests Ups & Downs of PR flow.
RubyMotion for Rails Developers - Your Views Have Come To Life
I’ve posted part 3 in the ongoing series trying to educate Rails, Sinatra, and other kinds of web developers, about the world of iOS and OSX development with RubyMotion. [more inside]
where_lower 0.3.0 released
I just released where_lower 0.3.0.
It helps you changing code like:
Person.where('lower(name) = ?', params[:name].downcase)
to this:
Person.where_lower(name, params[:name].downcase) [more inside]
Recurring subscriptions with Ruby, RSpec and modular arithmetic
Modeling recurring subscriptions programmatically is a potentially difficult undertaking that can be made infinitely easier with Ruby, RSpec, and a little Discrete Math 101.
Code Show and Tell: PolymorphicFinder
This refactoring shows a real-world example of the Builder, Decorator, Chain of Responsibility, and Null Object patterns as well as recursion, using a fold/inject, object composition, and immutable objects in Ruby.
Reading Rails - How Validation Are Configured
You use them every day, now it’s time to learn what’s going on under the hood. [more inside]
Generate files based on erb template + environment variables and/or yaml file
Have you ever felt the need to generate files based on environment variables or yaml files? If your answer is yes, then filegen can be quite helpful for you: https://github.com/dg-vrnetze/filegen.
Run Rails Tests a little faster
Wrote a quick, small blog post that provides a rake task to help run tests a little bit faster, on Rails 3.2.
Explaining RubyMotion views to Rails developers
Yesterday I put out an article explaining Apple’s MVC pattern in a way Rails developers could understand, and it got a crazy amount of traffic, well for my standards 600 views in 24 hours seemed impressive for a fairly new blog. [more inside]
Generating PDFs with custom fonts using wkhtmltopdf
Tutorial on creating PDFs with custom fonts using wkhtmltopdf and some feedback on different techniques.
Storing Data without CoreData in RubyMotion
Episode 6 has just been released for MotionInMotion. [more inside]
Using multiple MongoDB databases instead of one – performance check
Maybe instead of one database it is worth using one per user? Well in case of MongoDB it seems that it is definitely worth a try. Check out my short blog post about that: http://dev.mensfeld.pl/2014/01/using-multiple-mongodb-databases-instead-of-one-performance-check/