3 ms·
Helpers. Enjoyed the post, but Rails also provides helpers to 'help' you with view specific logic. Granted, this might not be as fun as a plain Ruby class, but
by equalarrow 15y ago
Helpers.
Enjoyed the post, but Rails also provides helpers to 'help' you with view specific logic. Granted, this might not be as fun as a plain Ruby class, but I've used helpers extensively on various projects and whenever I join an existing project, it's one of the first places I look with dealing with the view layer.
One of the nice Rails conventions.
- alttab 15y agoPerfect response. My thoughts exactly. The only thing I would add is if its reusuable, document the method! If this is part of the apps "framework", document it! I can't count how many times I've run into basic app helpers with undocumented option hashes. Want your code to be reused? Make using it easier than rewriting it.