Rails Best Practices 3: Increase Controller’s readability

[POST UPDATE ON 19/07/2010 - 15:45] Continuing our analysis of the Rails Best Practices today we’ll see two other tricks to make more readable method of the controller.1. Methods within modelSuppose we have the classic user registry defined in such a way that an admin user can enable or disable other users.The deactivate method inside user Controller may be defined as follows:123456789101112131415161718class UserController < ApplicationController def deactivate @user ...

Read more