Do not burden your users with validations

One of the first things we learn in Rails which are greatly useful are ActiveRecord validations. However, since they are easy to add, it happens frequently that we are burdening our users with validations instead of making forms easier and clearer. For instance, let’s suppose we are validating the Social Security Number (SSN) of an … »

Inherited Resources is scopes and responder fluent

First, what is Inherited Resources? Inherited Resources is a gem/plugin that allows you to speed up development by making your controllers inherit all restful actions so you just have to focus on what is important. A Rails scaffold controller which responds to html, xml and json is as simple as: class ProjectsController »

Não sobrecarregue seus usuários com validações

Uma das primeira coisas que aprendemos em Rails e que são de grande utilidade são as validações do ActiveRecord. Porém, como as validações são muito fáceis de adicionar e remover, temos que ter certeza que não estamos sobrecarregando nossos usuários com validações. Por exemplo, supondo que estamos validando o CPF do usuário no cadastro e … »

Embracing REST with mind, body and soul

UPDATE: ActionController::Renderer was renamed to ActionController::Responder, so this post was changed to properly reflect such changes. About two and a half years ago, resources started to be a first class citizen in Rails when version 1.2 was released and it was all about RESTful admiration and HTTP Lovefest. Since then we’ve added map.resources to our … »

Creating your own generators with Thor

This summer I was selected with Josh Peek, Emilio Tagua and Nelson Crespo to work with Rails on Google Summer of Code (GSoC), which Nelson named as the Rails Summer Quartet. 🙂 Here, at Plataforma, we use a set of tools on our projects, which includes Inherited Resources, Remarkable and Formtastic. At some point, we … »

Platataforma Tecnologia e Engenharia de Software

Pergunta: Em uma frase, o que é a <plataforma/>? Resposta: É uma consultoria em engenharia de software. Pergunta: AH! Uma fábrica de software? Resposta: NÃO! Fábricas são locais que produzem commodities através de processos e modelos essencialmente estabelecidos no século XVIII. A atividade de desenvolvimento de softwares é muito mais recente e comprovadamente não se … »