Posts in English
Pratik lately is doing a great work refactoring ActiveRecord to make a full use of relations. Speaking in code language, this means that in Rails 3 you will be able to do: User.where(:name => “Jose”).order(“birthday”) And it will return a relation. The relation can be further manipulated and the query is only triggered when you … »
Tags: operators, ruby, unary, Posted in English, 10 Comments »
A new I18n gem just got released and it comes with two new backends extensions: Fast and InterpolationCompiler. First, what is a backend? I18n.t, I18n.translate, I18n.l and I18n.localize methods are actually just wrappers to I18n.backend, which is actually who does all the heavy lifting. This means that you can change your backend to other stuff, … »
Tags: i18n, performance, plugins, rails, Posted in English, 16 Comments »
Inherited Resources always had a hate/love history with Rails Edge. Just after DHH posted about respond_with, it was already there in Inherited Resources. This initial implementation provided a nice test suite and several use cases for a improved Rails’ implementation, based in Responders, which encapsulates all the behavior in one class, and can be added, … »
Tags: inherited_resources, plugins, rails, respond_with, responders, Posted in English, 7 Comments »
We have been working on an application that allows administrators to create accounts for their users. Each account will be accessible under a subdomain, so we needed to setup a subdomain environment inside our application, and also in our development machine. In addition, we must be able to let the users signed in among several … »
Tags: rails, session, subdomain, Posted in English, 33 Comments »
After Devise was released, there were some misunderstandings about Devise roles and how to use it. And the best way to understand it is explaining which problem we wanted to solve when we designing Devise. In most applications developed at Plataforma, we usually have two actors: one which represents the client who hired us and … »
Tags: authentication, authorization, devise, plugins, rails, roles, Posted in English, 2 Comments »
It has been a couple weeks since we first bloged about Devise. At that time, we released version 0.1 and now, after some great feedback, some enhancements and a few bugs fixes, we reached Devise 0.4. So, what changed since then? I’m lazy, you’re lazy Devise now comes with generators, so adding up authentication to … »
Tags: authentication, devise, generators, plugin, rails, Posted in English, 36 Comments »