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.

How to test a function that yields a block with Minitest and Rspec

Have you ever tried writing a test for a function that takes a block and does something to that block? I recently had to do that same thing and found there was not much written about it so in this post I’m going to fix that, I’m going to show you how to create expectations on block arguments. Read the article.

Integrating Trailblazer and ActiveRecord transactions outside of a request lifecycle

When you use Ruby on Rails with ActiveRecord, you can get used to having separate transaction on each request. This is valid also when using Trailblazer (when inside of a request scope), however Trailblazer on its own does not provide such functionality. It means that when you’re using it from the console and/or when you process stuff inside background workers, you no longer have an active transaction wrapping around an operation. Here’s a blog post I wrote on how to add such functionality into your operations.

"Ruby Web Dev: The Other Way" guide

I have started my personal guide to give a junior/middle Ruby wed developers a brief insights on different aspects: from Ruby code architecture to Frontend and DevOps. All the things that I consider viable for a modern Ruby Web Developer. As soon as some topic appears in our team’s internal discussions, and it has pros/cons - it is transferred to this guide. Read more

Improving Large Rails Apps with Service Objects

Nothing has improved my Rails apps more than service objects. A couple of weeks ago, I was asked to help out with an established Rails app. I found a User model that included 28 modules. All but 8 were namespaced under Users. A core object in your system, used everywhere, and it’s thousands of lines long. Madness like this can be sidestepped with service objects. Find out how.

Hebillas, the thoughbot Suspenders companion

We do our fair share of Rails new in the office. When we discovered Suspenders, we though we did found the holy grail solving all our problems. But Suspenders is also very opinionated. Instead of trying to maintain an active fork of it, we’ve decided to maintain a template on top of it, and it works quite well. Check for more details.

Cucumber Characteristics 0.5 released

Just released an update to cucumber_characteristics supporting cucumber 2.1+ and newer ruby versions (1.9+). cucumber_characteristics allows you to fully profile your cucumber test runs enabling you to understand exactly where your test time is going. This is a formatter and should drop into your existing setup transparently generating a html and/or json reports. Read more

Loading older posts