TL;DR allow_nilでNoMethodError対策 prefixでメソッド名に接頭辞をつける delegateの便利オプション allow_nil class User include ActiveMode::Model attr_accesor :profile delegate :name, to: :profile, allow_nil: true end class Profile attr_accessor :name end メソッド呼び出し時にターゲット(この場合はprofile)がnilの場合はnilを返してくれるようになる. NoMethodErrorがraiseされなくなるのでuser.try(:name)とかしなくてもよくなる. prefix class Event include ActiveMode::Model attr_accesor :name,