Hi, I’m a Ruby & Elixir developer, and this is my blog.

Dry-web-roda and Sprockets

Dec 11, 2017 – ruby and dry-web-roda

If you are migrating a Rails app to Dry-web-roda it is possible that you have your assets managed by sprockets. And, If you want to reduce the impact of the changes you will want to use sprockets in your new dry-web-roda app. Thankfully is really simple to do that.

more …

Test like Sandi

Oct 4, 2015 – learn and ruby

After seen Sandi Metz’s The magic tricks of testing advice on testing, you will want to test the way she does.

more …

Ruby 2: You can rid options argument

Aug 29, 2015 – ruby

Ruby 2 improved the support to keyword arguments. You can define your method with the default hash params as *args, and rid the options = {}. And no more need of options.reverse_merge(default_options).

def foo(bar: 'initial')
  puts bar

foo # => 'initial'
foo(bar: 'final') # => 'final'

Required arguments: you need a colon after the key (also you need ruby 2.1)

more …

Make youtube links work with Jekyll & Github Pages

Aug 22, 2015 – snippets

I try with the youtube plugin. It works fine at my local machine, but it does not at Github Pages (official documentation).

Them I did it with some coffeescript.

  • At the markdown post, I added this small HTML snippet <div id="youtube_video_id" class="youtube"></div>.

more …

Best Ruby and OOP Lesson I’ve seen

Aug 12, 2015 – learn and ruby

Sandi Metz at RailsConf 2015 - Nothing is Something

more …