Module: Pressroom::Authorable

Extended by:
ActiveSupport::Concern
Included in:
Post
Defined in:
app/models/concerns/pressroom/authorable.rb

Overview

Attaches the configurable author association.

The author class is the host application's, so it may not be configured at all. Declaring belongs_to with a blank class_name in that case leaves a landmine: the association resolves lazily and blows up with a NoMethodError from deep inside ActiveRecord the first time anything touches post.author.