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.

Ruby’s case statement – advanced techniques

Nothing could be simpler and more boring than the case statement. It’s a holdover from C. You use it to replace a bunch of ifs. Case closed. Or is it? Actually, case statements in Ruby are a lot richer and more complex than you might imagine. Let’s take a look. http://blog.honeybadger.io/rubys-case-statement-advanced-techniques/

` class Success def self.===(item) item.status >= 200 && item.…

Writing Smart Migrations: References, Reversible, And Indexes

Building a new feature usually means having to restructure the architecture of your application. In other words: writing a lot of migrations to modify your schema. This blog post looks at how to use references, reversible, and indexes to write smart migrations, and make things easier for developing your application in the long run.

Creating generators and executables with Thor

Thor is an amazing library for creating generators and executables. It gives you methods for creating and copying files and directories, defining symbolic links, reading remote files, and more. And is the perfect companion for gems that need to generate a project structure, just like Rails. Check it out.

JSON-less JSON schemas with rspec

Writing test’s to ensure that your end points and serialiser’s return the correct response can feel cumbersome and verbose. In this article I stand on the shoulder of giants and leverage the beauty of ruby to make Json Schema’s nice to write and work with. Check it out at Pursuit of Clean

Loading older posts