Merge branch 'openapi/master' into openapi/merge

This commit is contained in:
Greg Myers
2020-03-20 15:38:40 +00:00
42 changed files with 1296 additions and 346 deletions

View File

@@ -1,11 +1,16 @@
# frozen_string_literal: true
class Blog < ActiveRecord::Base
validates :content, presence: true
def as_json(options)
alias_attribute :headline, :title
alias_attribute :text, :content
def as_json(_options)
{
id: id,
title: title,
content: nil,
content: content,
thumbnail: thumbnail
}
end