Rails Best Practices 3: Increase Controller’s readability

Logo devnterface d88f51727b3053dd3115e1ef9c566ad79b4c2edb3cd208c06345fc37058bebd9

[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 UserControl...

Read more