Articles tagged as “rails”

Shedding some light into UUID version 4 in Ruby and Rails

Ruby's standard library and Rails's PostgreSQL adapter use by default version 4 UUIDs. This can be changed in Rails migrations via:

default: 'uuid_generate_v1()'

param whereas Ruby's stdlib only supports version 4.

Another interesting difference is in the implementations:

In the Ruby's s ...
read more

Improve Rails performance by adding a few gems

Working with Rails for some time you start nitpicking on how to improve it. This is a first in the series of articles regarding on how to improve (even marginally) Rails's performance.

I'll focus on a bunch of gems that speed up, in some cases considerably, small parts of Rails, like the html escaping, the String#bla ...

read more