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.
How to build a Rails 5 API only and Backbone application
Rails API is now part of Rails 5 https://github.com/rails/rails/pull/19832 !! Here we show how to use it to implement an API backend for a Backbone application http://wyeworks.com/blog/2015/6/11/how-to-build-a-rails-5-api-only-and-backbone-application
How to Build an App Development Team
Your development team—whether in-house, outsourced, or a combination thereof—is crucial to your product’s success. Choosing how to build your team can be difficult. Read more
Custom SpreeCommerce Payment Gateways
Spree makes it easy to take payments from any Payment Service Provider. will briefly walk you through the process of creating and using your own custom gateway.
Ruby on Rails freelancing on Fiverr
Hey! Just wrote a post about how I made $2000+ in my spare time with Fiverr using my Ruby and web development skills. If you ever thought about starting to freelance, I think this post would be of great help. Waiting for your questions or suggestions!
Ruby and RMagick do comic
A case of implementing xkcd-like image distortions algorithm with Ruby and RMagick
Top 6 Ruby Links for June 10, 2015
Top 6 Ruby Links for June 10, 2015
The Rubyist's Guide to Environment Variables
If you don’t feel 100% comfortable working with environment variables, check out this article I just wrote: http://blog.honeybadger.io/ruby-guide-environment-variables
Agile Web Development With RailsBricks 3 and Rubyonrails.link
Get started with Rails Bricks http://www.matthewreichardt.com/ruby-on-rails-agile-web-development-with-gems/ and with http://www.rubyonrails.link community
Default values in Hash
A quick introduction that explains what “default value” options are available on Hash and when to use them!
The problem with dependency injection
I’ve written up a blog post about the way how I deal with the construction of the dependencies
You've got the Rails basics. So why do you feel so slow?
You’re confident about the core ideas behind Rails. You can write working code, no problem. But now that you care about testing, maintainability, and design, it fels like it takes you way more time to ship anything! Why do you feel so slow? And how can you ship quality code, faster?
Working Effectively with Data Factories Using FactoryGirl
Exploring patterns that can help you use factories more effectively with examples based on Ruby’s FactoryGirl.
How To Create A Gem For Javascript And CSS Libraries
Ever used an obscure frontend library that doesn’t have a gem but wish it did? Here’s how to create a gem for a Javascript or CSS library.
Refactor to concepts
Anyone can write hard to understand code but think about helping your future self by making your code cleaner and more readable. Follow this simple step-by-step refactoring and then you can use the same strategy to make your code more understandable.
How Arel Converts Ruby Queries Into SQL Statements
Pat Shaughnessy shows how Active Record uses the Arel gem to convert the ActiveRecord::Relation object describing your query into a string containing a SQL statement. Read more
Conway's Game of Life.
This is a Rails implementation of “Conway’s Game of Life.” Read more
How good are your Ruby tests? Testing your tests with mutant
We write tests to avoid regression bugs. If that’s so important then do we test our tests? What is test coverage exactly? Is line coverage of any use? How does mutation testing fit here? I’m trying to answer those questions in my last blog post: Read more
Painlessly import themes into you Rails app
I just finished writing the first version of my new gem theme_importer_rails which allows you to import a bootstrap theme (or any kind of theme) into your Ruby on Rails application with one command. Please try it out and leave feedback. PRs are welcome as well!
Volt 0.9.3 Released with Support for Clustering, Simplified Persistence and Improved
The volt framework is progressing quickly as we move towards 1.0. We cover all of the changes in our latest blog post.
Decoupling CSS Selectors From Your Tests
For a long time, I’ve been bothered by the problem of using CSS selectors to target DOM elements in my tests (with Capybara). In this short article, I’m going to try Eduardo Gutierrez’s suggestion of using data attributes for targeting DOM elements instead of CSS selectors. Check it out
Refactoring to Reveal Rails Group_by
Refactoring is a humbling process – especially when you write a 10-line method only to discover that it already exists! This blog post refactors some bad code to reveal the Rails group_by method in all its glory.
How to Deal With and Eliminate Flaky Tests
Randomly failing tests are the hardest to debug. Here’s a system you can use to fix them and keep your test suite healthy. Read it here!
The Rational Command-Line Parser
$ ruby example/parse.rb -x 3 -y 4 -n5 -abc --beep=boop foo bar baz # =>
{ :_=>["foo", "bar", "baz"],
:x=>3,
:y=>4,
:n=>5,
:a=>true,
:b=>true,
:c=>true,
:beep=>"boop" }
Hitting real Angular http service from Jasmine test
Simple example about how to create tests for real services in Jasmine tests.
Cells 4.0 – Goodbye Rails! Hello Ruby!
Cells 4 got released. This version is completely decoupled from Rails, and allows view components in any Ruby environment. Read the release post and why it still allows to use Rails view helpers, why it’s faster than ActionView and where we’re going from here.