~/pavonz

Posts

A rails 4 tutorial application for beginners

This article was originally written for the [12 Devs of Summer](http://12devs.co.uk) and posted [here](http://12devs.co.uk/articles/writing-a-web-application-with-ruby-on-rails/). It was written for beginners, I described how to get up and running withRuby and Rails and I tried to offer an in depth look at what it’s like to work with it. In this tutorial, you'll create a simple _non Hello World_ application.

Hello Go lang!

During the last months, I was looking for a new programming language to learn for _fun and profit_. I picked [Go lang](http://golang.org), then I tried to build something enough complete and/or useful, to see how it feels to program in Go with an everyday task. Here's how it went.

Create recursive OpenStruct from a Ruby Hash

Maybe you already know and used the Ruby's [OpenStruct](http://www.ruby-doc.org/stdlib-2.0/libdoc/ostruct/rdoc/OpenStruct.html) class. I've played a bit with it to create a very easy to use configuration system for Ruby apps.

Rails4 StrongParameters with Devise and multiple resources

Rails 4 will use [StrongParameters](http://rubysource.com/rails-4-quick-look-strong-parameters/) by default. However, it doesn't seem that Devise is ready for this feature, even using its [rails4 branch](https://github.com/plataformatec/devise/tree/rails4). There's a [good example](https://gist.github.com/kazpsp/3350730) that explains how to solve this problem when dealing with only one resource (eg: `User`). I forked that code to handle more resources (eg: `User` and `Admin`) without repetitions.

3 weeks with a kindle

When I purchased an [amazon kindle](https://kindle.amazon.com/), some people started to ask about how's going with it and if it's worth to buy one. I decided to write a review only after the first battery recharge, just to be quite sure I've used it enough. This happened after three weeks, so here's my thoughts.

A new blog, more fun

It was exactly one year ago, when I launched for the first time http://andreapavoni.com. Now I'm here with a shiny new website, powered with a custom blog engine and some stuff to show off :)

Store Rails views on database

When it comes to develop a CMS, one of the main problems concerns where or how to store and organize views (templates, partials, layouts) for particular needs like different layouts for specific pages, (sub)domains or multi-languages.

Rails 3: An improved agnostic search model using Arel

In the [last post](/blog/rails3-using-arel-to-make-conditional-searches-based-on-conditional-params), I explained how to make conditional searches based on conditional params. I wrote a very simple Search class that returns a real model with query done by Arel. I refactored the code to make it simpler to use.