A couple new tricks in a trade never hurts anybody, but 19?! Check this out.
I came across a very helpful article from Ruby Inside today, “19 Rails Tricks Most Rails Coders Don’t Know“. I actually knew all of those tricks, but I’ve actually forgot a few a long the way; so it was a nice helpful reminder to read that list over. One of the more interesting ones was this little bugger:
Convert arrays to sentences in views - If you were collecting a bunch of names to be shown in a view, you might end up with an array like ['Peter', 'Fred', 'Chris'], and joining these with commas and inserting ‘and’ before the final one is a common pain. Not so, if you use the array method to_sentence as provided in Rails. names.to_sentence would return Peter, Fred, and Chris.
There’s a ton of little snippets of information like above from this article. Did you find any of them to be helpful? Go ahead and post your own tip, maybe we can create our own list!