RubyFlow The Ruby and Rails community linklog

×

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

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

Introducing Whiny Validation. So You Can Figure Out Why Your Rails Specs Failed.

Sometimes when you run a spec in a Rails app, it fails silently but it isn’t clear why. Frequently, this type of spec failure is due to an input validation error. But the log won’t tell you that. That’s why I created the Whiny Validation gem. Whiny Validation watches for ActiveRecord validation errors on all models. Whenever one occurs, it logs the validation message and dumps the ActiveRecord object (with inspect) to the log. A quick look at the log tells you why the spec failed.

A Guide to Choosing the Best Gems for Your Ruby Project

If you need something done in Ruby, a gem for it probably exists. Well, a dozen gems for it probably exist. Some of them are elegant, featureful, and well-maintained, and others were written to solve one use case the author ran into that one time. You have lots of gems to choose from, so how do you choose the right one? This choice is important — by the time you regret adding a gem to your project, it’s painful to change back.

Ruby and Rails Syntax Tips - The Difference Between blank?, nil?, and empty?

When working with Ruby and Rails, a common source of confusion involves mixing up nil?, blank?, and empty?. All three methods clearly deal with determining whether a data structure is assigned a value, but there are different degrees of nothingness, and in the world of programming those degrees are important. This blog post helps to dispel the confusion by working through a number of different examples.

Composable Operations

Composable Operations is a tool set for creating operations and assembling multiple of these operations in operation pipelines. They are especially useful in large-scale Rails applications to model complex business transactions. In other words, they can be used to implement a service layer.

Loading older posts