mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 15:22:56 +00:00
Merge branch 'openapi/master' into openapi/merge
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user