RubyFlow The Ruby and Rails community linklog

How To Write "Macros" in Ruby

In Rails you use class-level declarations such as has_many, belongs_to, and other so-called “macros” all the time, but do you know how they work? In this short video tutorial we recreate a simplified version of the has_many declaration from scratch so you understand how to apply this same powerful technique in your own Ruby code!

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in