Posts tagged with ruby


The Enumerable#each_with_object method behaves very similarly to Enumerable#inject! There are only a couple of differences! The block arguments are reversed The inject method passes the block arguments in the following order…

Valid Ruby (the only valid line of code in this post) before_validation(on: :create) { contact.email ||= email } Drop braces and use a stabby proc before_validation(on: :create) -> contact.email ||= email Drop…

tldr; Let's get started I've heard a lot about Docker over the past year but haven't really dived into it much until recently. So far the experience has been amazing! I've found the technology to…