{
'card-copied-to' => CardCopyChange,
'card-copied-from' => CardCopyChange,
'card-creation' => Change,
'card-deletion' => Change,
'card-type-change' => CardTypeChange,
'description-change' => Change,
'property-change' => PropertyChange,
'name-change' => NameChange,
'tag-addition' => TagChange,
'tag-removal' => TagChange,
'attachment-addition' => AttachmentChange,
'attachment-removal' => AttachmentChange,
'attachment-replacement' => AttachmentChange,
'comment-addition' => CommentChange,
'system-comment-addition' => CommentChange,
'page-creation' => Change
}.each do |type, clazz|
elements :change, :as => "#{type.gsub(/-/, '_')}_changes", :class => clazz, :with => {:type => type}
end