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.

Refactoring Tips: Don't Trust Your Unit Tests

Before you start making any changes, make sure you have an integration test covering the part of the application you’re changing. While unit tests might be useful on a small scale refactorings, they usually break if you change the layout of your code, even a little bit. This is mostly because a big portion of the unit tests will depend on the exact API of your classes, instead of their behavior. Continue reading<p>

Changing the Rails Console Prompt

The Rails Console is an indispensable tool, providing developers with an easy way to experiment with models, Ruby syntax, and pretty much any other code associated with a Rails project. But the default prompt is a bit overbearing, including by default the Ruby version and number of commands executed in the current session. You can easily simplify the default prompt by following the instructions found in this easy tip.

Easy, Fast, Powerful: This is Your Rails on Ninefold (Review)

Recently, I spent some time checking out Ninefold, a Rails hosting platform that’s aiming to combine the ease and low barrier-to-entry of Heroku with the configurability and power of AWS. Over a couple of days, I branched a simple in-house app and pushed it to Ninefold. I’ve distilled my first impressions down to a few points that I hope are useful the next time you’re looking for a Rails host. Read more: http://blog.palominolabs.com/2014/05/05/ninefold/

Untangle spaghetti code with a simple change of perspective

That giant mess of if statements keeps staring you in the face. You feel like you should be able to simplify it, except for that Business Logic that keeps getting in the way. For example, say you have a sales platform where you build Quotes, which have many LineItems. Except, you can have a quote with duplicate line items if they’re ads, but if you have multiple websites, you have to sum the prices together and have it show up as a single line item. Oh and also, if you buy a website and already have five ads in your quote, you have to give them a 20% discount on the website. [more inside]

Loading older posts