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.
Migrating user data from MySQL to Postgresql (using Kiba ETL)
Glenn Goodrich from SitePoint shares his experience using Kiba ETL and Ruby to migrate data from MySQL to PostgreSQL. With funny pictures and jokes, too!
Tweet like Larry King
Larry King has a very special way of tweeting. With a bit of Ruby and Twilio magic, you too can tweet like Larry King.
Three little ruby hacks I love
Blog posts don’t have to be about big ideas all the time. Here are 3 little hacks I love to make Ruby even better.
The clever hack that makes `items.map(&:name)` work
Ruby’s “ampersand colon” isn’t an operator. I wrote a quick blog post explaining how it works under the hood: http://blog.honeybadger.io/how-ruby-ampersand-colon-works/
Capybara and asynchronous stuff
An article about running asynchronous JavaScript code in Capybara
Terminal Kung Fu - Knowledge from the Command Line Masters
Take your command line game to the next level with these lesser known commands that are wielded by the masters. http://www.rubyonrails365.com
Building a Ruby Gem in 2015
Building and publishing a gem, even a simple one, is a great way to level up your Ruby skills and gain experience with GitHub’s powerful ecosystem of tools. Here’s what I learned.
Creating easy, readable attributes with ActiveRecord enums
Imagine a question that can be either “pending”, “approved”, or “flagged”. Some models call for this kind of data. An attribute that can have only one of a few different values, values that rarely change. Recently, Rails took a stab at solving this with ActiveRecord enums.
Organizing JavaScript in Rails Applications with Turbolinks
I wrote a new article on Organizing JavaScript in Rails Applications with Turbolinks. Hope you enjoy!
DeepDup Gem Released
I was not able to find a plain Ruby some_deeply_nested_object.deep_dup library so I created one. GitHub link to the gem: deep_dup.
The Node.js task runner diaspora
This is the first episode of our new BazaarJS series, dedicated to exploring the world of JS, from the point of view of a Rails developer… today we’ll be talking about build tools and task runners. Gulp, Grunt, Broccoli: why so many choices, which one is better? Read more
Cognac Gem Released
A simple library to implement Amazon S3 upload using CORS. Browse the source code or view it on Rubygems.org
Advanced Ruby Hash Techniques
This post shows some lesser-known but super useful Hash tricks. Learn how to lazily build lookup tables, raise exceptions when hash keys aren’t present and create infinitely nested hashes. http://blog.honeybadger.io/advanced-ruby-hash-techniques/
React.js - A guide for Rails developers
Nowadays, React.js has become one of the most popular JavaScript UI libraries. This extensive tutorial plugs it into the Rails stack to build frontend-powered applications, or you might say, Rails views on steroids.
Dynamic connectivity with Ruby
The dynamic connectivity problem uses a graph (a data structure) that maintains information about the relationship between its components. With this information the data structure can answer whether there is a connection between two objects or not.
Extending ActiveRecord association to cleanup your associations code
For some reason not many RoR developers know that they can extend ActiveRecord associations. This feature can be a great way to cleanup any relational code that is dependent on a parent resource. Here are few examples on how and when to use it: Extending ActiveRecord association to cleanup your associations code
LinkHum: humane link urlifier
LinkHum is humane, correct and customizable URL auto-linker in user-entered text. Just call LinkHum.urlify(any_text_with_urls) and there will be correct <a> tags. It tries hard to do the most reasonable thing even in complex cases.
Taskmanaging Your App, Part 1: Using Rake
Rake tasks: we all use them. But how exactly do they work? Where should you write them, and how do your tasks get interpreted? Here’s a blog post that dives down the rabbit hole of rake tasks, and how you can use them to task manage your applications!
How do I encrypt data in my database?
A beginner’s guide to keeping your data safe from those nasty bad guys:
Rebuilding Rails Model callbacks.
Where I start from scratch and (re)build the Rails Model callbacks. And some learnings along the way.
Lazy image creation with Carrierwave
firedev.com/posts/2015/lazy-image-creation-with-carrierwave/ Read more
Rails vs. Lotus
A comparison between the two Ruby web frameworks
Delegating to Query Objects through ActiveRecord scopes
Query Objects are a fairly well known concept in Rails. In this post, I’m explaining how you can use a Query Object as an ActiveRecord scope.
Exploring a weighted quick find union algorithm in Ruby
In this article I explore the weighted quick find union algorithm in Ruby. This is an algorithm useful to finding out whether node A is connected to node B. Think of a maze: Is there a solution from the start to the finish? Or a network: Can computer A speak to computer B.