This week in my current project I've come across two ruby constructs that were new to me.

with_scope and returning.

Found a blog where they are both nicely explained: