Posts tagged "rails"

Active Record loves blocks

When creating an Active Record object, either by using `new` or `create`/`create!`, or even through a `belongs_to` or `has_many` association, you can give a block straight to the method call instead of relying on `tap`. It is possible to avoid doing manual work, sometimes simple stuff such as using `tap` with methods like these, or sometimes more complicated things, by getting to know what a framework like Rails can give us for free.

Why your web framework should not adopt Rack API

Or, even better, why your web framework should not adopt a CGI-based API. For the past few years I have been studying and observing the development of different emerging languages closely with a special focus on web frameworks/servers. Unfortunately, most of the new web frameworks are following the Rack/WSGI specification which may be a mistake … »

Improving the integration between Capybara and RSpec

When David Chelimsky was visiting São Paulo in last April, we invited him to go out for some coffee, beers and brazilian appetizers. We had a great time and we talked about different topics like OO, programming languages, authoring books and, as expected, about testing. One of the topics in our testing discussion was the … »

Say hi to Devise 2.1.0 !

In this blog post we talk about a new feature upcoming on Devise 2.1 that aims to provide developers faster feedback in case a model is missing a field required by Devise behaviors.

I18n Alchemy – localization and parsing

Today I want to show you a project I’ve started over a year ago, during Mendicant University core skills course. For those who don’t know, Mendicant University is a group of skilled software developers that offer courses, mentoring, and help out the community, started by Gregory Brown, and that nowadays counts with some other awesome … »

Barebone models to use with ActionPack in Rails 4.0

Rails 4 will ship with ActiveModel::Model, a module that includes the minimum required by Action Pack to work in forms, urls and so forth. Learn more about this module, how to use and extend it in this blog post.