Ruby and Rails have many magic features like blocks/closures, duck typing/mix-ins/modules, method_missing, poetry mode.
One of the common tasks in programming web applications on Rails is finding a row in a table by several columns and creating a new row in case of row is missing.