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.

Run it in background job, after commit, from Service Object

There is this problem that when you schedule a background job from inside of a running database transaction, the background job can kick in before the transaction is commited. Then the job can’t find the data that it expects to already be there, in database. How do we solve this issue? Let’s schedule the job from Service Object after db commit. [more inside]

Self hosted Rails metrics app in less than 200 lines of code.

NewRelic is too expensive for your hobby Rails application and you still need to keep record of app’s performance for more than 24 hours? Try to create self-hosted metrics collector with Ruby, Sinatra, Grafana and InfluxDB in less than 200 lines of code.

Pretty cool.

What do you think about `private def … end`?

Recently I was told that “too bad Ruby doesn’t support private def … end because it forces us to put related methods far from each other.” [more inside]

Avdi Grimm mentioned this in one of his early Ruby Tapas videos and I’ve been u…
The problem with use private isolate and the methods below it’s fact to be comp…
I think the key question is, “Does this make all my code more readable?” It …
Thank you all for the replies. Looks like it all boils down to how the code is …
Loading older posts