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.

Making controller logic easier to test, by removing it from the controller

The gem can be found here: It’s inspired by trailblazer, but sticks more to how rails is laid out. To use the default functionality, for each of your actions, you can just do: render json: model or however you want to render the response. model is a memoized method that looks up an operation and policy and applies whatever custom logic you want to implement. Checkout the readme for details. Read more

Is it nil?

This is an article about what happens in Ruby when you ask something if it is nil. A look at the underlying Ruby source code to see what makes the nil? method tick. Hint: OOP and Inheritance.

How to Write Future-proof Mocks in RSpec 3

Tests are an important component in most software applications. Whether tests drive the development, or are bootstrapped on after the fact, tests need to be reliable for future development to progress. An application’s complexity rises with time. During and after this increase, ensuring that a test suite makes the right assertions and mocks in an intelligent and sturdy way is crucial.

Static Site Generator of the Year 2015 - Middleman or Jekyll?

Hello, For today’s Vienna.html (static site) meetup I’ve prepared a talk titled “The World’s Greatest (Free) Static Site Builders / Generators”. Browse the slides (use space to flip through) or the all-in-one page source. What your favorite static site builder / generator? Jekyll? Middleman? Nanoc? Any other? Vote for Year 2015 Award on Twitter. Cheers.

FYI: Thanks for voting (24 hours). The results (32 votes): 1 Jekyl…

Peeking Under The Hood of ActionController Parameters, Part 2

It’s really easy to forget how much of Rails is abstracted away into a black box. Simple things like strong parameters or how a controller’s action’s handle the request-response cycle can seem magical — until we look at what’s actually going on under the hood. This blog post looks at how ActionController::Parameters isn’t just as simple as a Ruby Hash, and explores where parameters get set in ActionController::Metal.

Loading older posts